mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2025-04-29 04:16:03 +00:00
Add sane default memory hook to Cytoplasm, fix more leaks in json.
This commit is contained in:
parent
4b85d10983
commit
061d9df739
4 changed files with 73 additions and 2 deletions
|
@ -199,6 +199,15 @@ extern void MemoryIterate(void (*) (MemoryInfo *, void *), void *);
|
|||
*/
|
||||
extern void MemoryHook(void (*) (MemoryAction, MemoryInfo *, void *), void *);
|
||||
|
||||
/**
|
||||
* The default memory hook, which has sane behavior and is installed
|
||||
* at runtime. This function does not use any memory on the heap,
|
||||
* except for the MemoryInfo passed to it, which it assumes to be
|
||||
* valid. Everything else happens on the stack only, to ensure that
|
||||
* the hook doesn't make any memory problems worse.
|
||||
*/
|
||||
extern void MemoryDefaultHook(MemoryAction, MemoryInfo *, void *);
|
||||
|
||||
/**
|
||||
* Read over the block of memory represented by the given memory info
|
||||
* structure and generate a hexadecimal and ASCII string for each
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue