There is no malloc_addblock() in libmemory.a and thus one gets the missing reference error when following the current documentation, which talks a lot about that function but only of linking with libmemory.a. Of course in the case of libmemory.a in a hosted environment one does not strictly need that function and calling it makes not really sense - however, having an implementation anyway would make it possible to share the same code in the user application (and documentation examples, tests etc.) no matter which variant is linked eventually. One easy way to accomplish that would be to add something like:
As I wrote initially, I would add a run-time warning there too to make sure the user understands what is going on (else this is easily missed I guess).
Split from #71
There is no malloc_addblock() in libmemory.a and thus one gets the missing reference error when following the current documentation, which talks a lot about that function but only of linking with libmemory.a. Of course in the case of libmemory.a in a hosted environment one does not strictly need that function and calling it makes not really sense - however, having an implementation anyway would make it possible to share the same code in the user application (and documentation examples, tests etc.) no matter which variant is linked eventually. One easy way to accomplish that would be to add something like:
As I wrote initially, I would add a run-time warning there too to make sure the user understands what is going on (else this is easily missed I guess).