This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Call for testers: libiberty/physmem.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]