Why Nostr? What is Njump?
2025-03-30 13:24:09
in reply to

Chris [list of emoji] on Nostr: nprofile1q…hch8f It depends on what you mean by "raw amount of memory". There's 1. ...



It depends on what you mean by "raw amount of memory". There's

1. Memory requested from the system via `brk()`.

2. Memory managed via the language's allocator (e..g. new/malloc/etc).

If I do

char* x = new[1000000];
delete x;
x = new[1000];

The process will (probably!) still be holding onto that 1000000 bytes because the first `new` will have requested that RAM from the system and not released it.

(ctd)
Author Public Key
npub1y9sm8lpfk08w6rhlqdx65qpmpdhggsj9wysxx6h04v5yqe29q29s9xd2j5