users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dl_malloc


From: Jesper Eskilson
Subject: Re: dl_malloc
Date: 13 Oct 2000 17:06:16 +0200
User-agent: Gnus/5.0806 (Gnus v5.8.6) XEmacs/21.1 (Capitol Reef)

Daniel Diaz <address@hidden> writes:

> Hello Edmund,
> 
> The reason to not use the initial malloc is because it uses MMAP for big bloc 
> allocations and the MMAP adresses returned are not compatible with gprolog 
> address space (3 most significant bits should be 0).

Daniel,

There is a better solution to this. GLIBC has a function mallopt() which
can be used to set parameters for malloc(). One of the parameters is
M_MMAP_MAX, which sets the maximum number of chunks to allocate with
malloc(). Thus, the call

        mallopt(M_MMAP_MAX, 0)

disables all use of mmap() in malloc().

Regards,

/Jesper
-- 
-------------------------------------------------------------------------
Jesper Eskilson                                         address@hidden
Virtutech                                         http://www.virtutech.se
-------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]