1. Linux malloc syscall
- Posted by stabmaster_ at HOTMAIL.COM May 06, 2002
- 367 views
I was writing some code for a Linux replacement for kernel32.dll today (for my gendll library). You know, just for the fun of it.. So, all was going just fine until I came to the memory management section. I can't find a syscall for memory allocation/freeing. Surely, there has to be one (tell me there is one!). Am i supposed to use the mmap/munmap calls or something?
2. Re: Linux malloc syscall
- Posted by jbrown105 at speedymail.org May 06, 2002
- 363 views
On 0, stabmaster_ at HOTMAIL.COM wrote: > > I was writing some code for a Linux replacement for kernel32.dll today (for > my gendll library). You know, just for the fun of it.. So, all was going > just fine until I came to the memory management section. I can't find a > syscall for memory allocation/freeing. Surely, there has to be one (tell me > there is one!). Am i supposed to use the mmap/munmap calls or something? > Are you trying to use assembler to write the dll? Well, I suppose it probably would be quite difficult to do in C. Is there anyways you can call the malloc/free functions in the glibc library? That would (one would hope) be simpler, as it is I have no experiance with using syscall() so I reget being unable to help you there. You could try getting the kernel source (and possibly the source code for glibc) and look through the files for the information you need ... hopefully theres an easier way. You could alway try posting to a Linux newsgroup for help, linux.devel would most likely know the answer to this. jbrown -- http://fastmail.fm/ - Access your email from home and the web
3. Re: Linux malloc syscall
- Posted by stabmaster_ at HOTMAIL.COM May 06, 2002
- 363 views
>Are you trying to use assembler to write the dll? Not trying - doing :) >Is there anyways you can call the malloc/free functions in the glibc >library? I'm compiling the dll with MASM on Win2000 so I doubt it.. >You could try getting the kernel source (and possibly the source code for >glibc) and look through the files for the information you need ... I guess that's an alternative. Though i don't really feel like browsing through endless lines of code. >You could alway try posting to a Linux newsgroup Done. I hope i'll get an answer.