Skip to content

Draft: Foreign.Marshal.Pool modified to use Arena

Daniel Bourgeois requested to merge dcbdan/ghc:T18338 into master

This commit addresses #18338 (closed).

In order to expose the Arena allocator to be exported, a includes/rts/Arena.h was added and includes/Rts.h includes it. Previously hidden functions in rts/Arena.h were put in includes/rts/Arena.h. Please verify that this is ok. Also, an additional Arena function, inArena is implemented. This is used in the implementation of PooledReallocBytes.

The Pool type is implemented as just a pointer to the Arena. newPool, freePool, PooledMallocBytes and PooledReallocBytes were reimplemented.

Edited by Andreas Klebinger

Merge request reports