I don't have access to a -current machine to try this on, so this only
applies to 3.4.

I have my ulimit set to 8MB for data/etc:

 ulimit -a
core file size (blocks)     8192
data seg size (kbytes)      8192
file size (blocks)          8192
max locked memory (kbytes)  4096
max memory size (kbytes)    8192
open files                  24
pipe size (512 bytes)       1
stack size (kbytes)         2048
cpu time (seconds)          5400
max user processes          32
virtual memory (kbytes)     8192


I have a program that starts to attempt mallocing 8MB, and decreasing the
malloc size by 1 byte every time malloc fails. I end up with a value somewhere
between 7 and 8MB when malloc succeeds, which is fine.

However, when I actually use this malloc'ed region, I segv when I touch the
very last page. Can anyone explain this? :)

As long as my malloc doesn't bump into the ulimit, everything works fine.
Either malloc() doesn't take into account a fencepost situation somewhere,
or I'm losing my mind. :)

Kevin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to