custom memory manager..



Hello,

I am developing a user level memory manager for a protocol stack. It
will replace the usual malloc() by something like my_malloc() and free
by my_free(). The basic idea is to minimize the chances of memory non-
avaliabiltiy, minimize system calls at run time thereby minimizing
risk for failure, and use the memeory in an effcient way.

The problem is i donot want to change the prototype of my_malloc which
is currently same as malloc() but I also want to associate debug
information along wth every buffer allocated.

For example, if function f1() from task T1 calls my_malloc(), then I
want to associate things like

1. task_id,
2. regiser counetrs,
3. stack trace or any other relevant debug info that would help me
debug any memory crash.

Can any one suggest how can I do it? I mean which system call will hel
me and whatother info (other then the one i have mentioned) can be
used?


.



Relevant Pages

  • [UNIX] PHP gd Library imageRotate() Function Information Leak Vulnerability
    ... PHP gd Library imageRotateFunction Information Leak Vulnerability ... Information leak vulnerabilities allow access to e.g. the Apache memory ... gdImagePtr gdImageRotate (gdImagePtr src, double dAngle, ... if($debug) ...
    (Securiteam)
  • Re: Problem only in release version!
    ... Debug version may still have the problem, but the stack space is better ... memory or a buffer on the stack is not always caught. ... > Just to affirm Jochen's point, the Debug version initializes most ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Epia Mini-ITX ce installation
    ... run your apllication on the CE simulator, or maybe even when you try to ... Normally the Emulator emulates a device with 32MB ram memory. ... A debug CE image is roughly about twice the size of a retail image. ...
    (microsoft.public.windowsce.embedded)
  • Re: Errors locking offscreen surface if application heap is large
    ... DX7 still should have good debug output, have you turned the debug level all ... > Depending on systems' memory configuration the java's heap setting at ... >> few different memory configs, and a few different graphics card configs, ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Need help with own PXE/bootloader and SDI images
    ... If the problem is in NT Loader, switching to serial debug may show some good ... that SDI is loaded in memory where it is expected. ... reallocate the ...
    (microsoft.public.windowsxp.embedded)