This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Call for testers: libiberty/physmem.c
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Mike Stump <mstump at apple dot com>
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, mrs at apple dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Mon, 24 Feb 2003 18:34:31 -0800
- Subject: Re: Call for testers: libiberty/physmem.c
- References: <A19DC714-4867-11D7-8124-003065A77310@apple.com>
Mike Stump <mstump at apple dot com> writes:
> On Monday, February 24, 2003, at 06:06 PM, Kaveh R. Ghazi wrote:
>> That's really strange. I don't know how you ever got gcc to work on
>> that particular box.
>
> Not the box, the OS. Conclusion, it isn't actually enforced. Hum...
> Do we want to add code to gcc to ignore DATA on darwin?
>
> The reason is that all boxes, all users currently have this set
> artifically low, everyone else just ignores it, maybe gcc should as
> well?
I have a theory.
My theory is that, on Darwin, RLIMIT_DATA is applied only to memory
allocation via brk(), but both malloc() and ggc-page.c are getting
their memory from mmap() or equivalent. Possibly malloc uses the real
Mach memory-allocation primitive, whose name I do not remember?
One way to confirm or falsify this theory would be to write a mini
program that allocates and dirties memory, using malloc, and see if
it maxes out at RLIMIT_DATA or RLIMIT_AS.
And one plausible thing to do about it, if the theory proves true,
is to ignore RLIMIT_DATA on systems that define RLIMIT_AS.
zw