When will malloc use sbrk?

Clarence Dold dold at mitisft.Convergent.COM
Wed May 9 01:56:30 AEST 1990


in article <2127 at bruce.OZ>, mmcg at bruce.OZ (Mike McGaughey) says:

-> I also need malloc(3) - because things
-> like curses and stdio use it.  However, it would be nice to be able to
-> check whether malloc will need to use sbrk() before calling malloc -
-> that way, I can give malloc large, aligned chunks of memory, to reduce
-> fragmentation.

-> (1) Is there any simple way to do this?  Is it possible, for example,

It might be as simple as compiling with -lmalloc, which is an optional
malloc library that does sbrk of large, contiguous memory space.
-- 
---
Clarence A Dold - dold at tsmiti.Convergent.COM            (408) 435-5293
               ...pyramid!ctnews!tsmiti!dold        FAX (408) 435-3105
               P.O.Box 6685, San Jose, CA 95150-6685         MS#10-007



More information about the Comp.unix.wizards mailing list