[GHC] #7718: ios patch no 8: adjustor pools
GHC
cvs-ghc at haskell.org
Sat Apr 27 14:04:13 CEST 2013
#7718: ios patch no 8: adjustor pools
--------------------------------+-------------------------------------------
Reporter: StephenBlackheath | Owner:
Type: feature request | Status: patch
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Os: Other | Architecture: arm
Failure: None/Unknown | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: 7724 | Related:
--------------------------------+-------------------------------------------
Comment(by igloo):
Here's the Linux code:
{{{
void *allocateExec (W_ bytes, void **exec_ret)
{
void **ret, **exec;
ACQUIRE_SM_LOCK;
ret = ffi_closure_alloc (sizeof(void *) + (size_t)bytes,
(void**)&exec);
RELEASE_SM_LOCK;
if (ret == NULL) return ret;
*ret = ret; // save the address of the writable mapping, for
freeExec().
*exec_ret = exec + 1;
return (ret + 1);
}
}}}
Note that it puts the writable address at the start of the memory
allocated, so `freeExec` can find it:
{{{
void freeExec (void *addr)
{
void *writable;
writable = *((void**)addr - 1);
}}}
Doesn't this do what you use the hash table for?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7718#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list