1. Linux malloc syscall

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?

new topic     » topic index » view message » categorize

2. Re: Linux malloc syscall

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Linux malloc syscall

>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.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu