Zhihui Zhang wrote:
> sbrk() is not supported in FreeBSD as a system call (see file
> vm/vm_mmap.c).

pancake:/sys> grep -w sbrk /usr/src/sys/kern/syscalls.master
69      STD     BSD     { int sbrk(int incr); }

If you use malloc() in your program, you shouldn't use sbrk, because doing
so will make the malloc() code lose count of what memory has been added to
the heap.  The result of this is that your program will almost certainly
crash due to different memory objects being stored in the same area of
memory.

The version of sbrk in libstand is an emulation of the system call which is
not used for any programs running in multiuser mode (or at least, it
shouln't be, if it is).

Nick

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

Reply via email to