FFI calls: is it possible to allocate a small memory block on a stack?

Denys Rtveliashvili rtvd at mac.com
Fri Apr 23 14:07:29 EDT 2010


It appears that I am on 6.12.
Strange, as I thought I have check-out the HEAD by following the
instructions on the wiki:

        darcs get --partial http://darcs.haskell.org/ghc

The wiki does not tell explicitly what will be checked out, so I
expected it to be HEAD.

With kind regards,
Denys Rtveliashvili

> Denys Rtveliashvili wrote:
> > OK, the code I have checked out from the repository contains this in
> > "rts/sm/Storage.h":
> [global pinned_object_block variable]
> Odd. This was changed in ghc head by a patch dating Dec 1st 2009:
> Tue Dec  1 17:03:21 CET 2009  Simon Marlow <marlowsd at gmail.com>
>   * Make allocatePinned use local storage, and other refactorings
>   This is a batch of refactoring to remove some of the GC's global
>   state, as we move towards CPU-local GC.  
> ...
>     - allocatePinned() was still allocating from global storage and
>       taking a lock each time, now it uses local storage. 
>       (mallocForeignPtrBytes should be faster with -threaded).
> ...
> which turned pinned_object_block into a per-capability variable.
> So which version of ghc are you looking at?
> regards,
> Bertram
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20100423/76893584/attachment.html

More information about the Glasgow-haskell-users mailing list