Re: [cc65] _heapremove() RFE

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-02-15 09:37:27
Hi!

On Mon, Feb 14, 2005 at 09:45:23AM +0100, Micha?? Bartczak wrote:
> I don't know if this topic showed up, but it could be nice to get a
> function that removes block from heap free list, something like
> void __fastcall__ _heapremove(void* mem, size_t size);

That is difficult for several reasons:

  * There is not only the free list. There's also a big chunk of memory
    located between the program end and the heap. The free list takes only
    those blocks that cannot be merged into this block.

  * The block to remove may have already been allocated, in whole or
    partially.

Your request does also bring up the question "why add something to the heap in
the first place, when you don't want it to go there?". Wouldn't it be more
straightforward to exclude this block using the linker config?

Regards


	Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Feb 15 09:37:31 2005

This archive was generated by hypermail 2.1.8 : 2005-02-15 09:37:41 CET