|
From: | Richard Frith-Macdonald |
Subject: | Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac |
Date: | Mon, 30 Jun 2008 15:00:58 +0100 |
On 30 Jun 2008, at 12:33, David Chisnall wrote:
My man page for vmalloc states: The obsolete function valloc() allocates size bytes andreturns a pointer to the allocated memory. The memory address will be amultiple of the page size. It is equivalent to memalign(sysconf(_SC_PAGESIZE),size). I'm not sure whether you are aware of the fact that this function is considered obsolete.Not according to POSIX, however it is recommended that applications use mmap or malloc if possible. In our case, the ideal solution would be a dedicated, mmap-backed, NSZone for allocating invocation trampolines.
Sounds good.At the moment I'm just concentrating on getting libffi working reliably, but I'd love to add better performing code if you can provide it. The idea of per-thread allocation sounds good, but even better if it cold somehow be integrated with the autorelease mechanism so that we can minimise the number of times we look up the current thread, while ensuring that we never leak memory.
[Prev in Thread] | Current Thread | [Next in Thread] |