D's New GC and Object Allocation Pools
Mike via Digitalmars-d
digitalmars-d at puremagic.com
Sun Oct 26 00:08:19 PDT 2014
On Sunday, 26 October 2014 at 04:22:29 UTC, Mike wrote:
> but there may be a way to link in your implementations instead
> of the defaults at link time, thus giving you an "override"
> effect.
>
The technique I was thinking of here is the --wrap option in the
ld linker [1] (See the bottom of the page). I use this in my
microcontroller programming to override malloc and friends for
devices that have discontinuous memory and no MMU.
I tried this on my Linux desktop, and while everything compiled
and linked without errors, it resulted in a segmentation fault at
runtime. But where I have failed, others may succeed. I tested
with LDC and GDC, but not DMD.
Mike
[1]
http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html
More information about the Digitalmars-d
mailing list