Nmap Malloc etc...

L

lasek

Hi all...now after a lot of experiments in c programming(two weeks..for
precision), i've seen another strange instraction..and i post you the
question...
Like in the subject...why i must use nmap rather then malloc????.
Best regards all..
See you from Rome, Cla.
 
J

Jens.Toerring

lasek said:
Hi all...now after a lot of experiments in c programming(two weeks..for
precision), i've seen another strange instraction..and i post you the
question...
Like in the subject...why i must use nmap rather then malloc????.

What's nmap? Never heard of that function - it's definitely not
a standard C function. So there definitely does not seem to be
any need to use it instead of malloc() if you write portable C
programs. Should you mean "mmap()" instead of "malloc()", then
you're talking about a UNIX (only?) function that allows to map
a file into memory (but also allows to allocate a memory region
under certain conditions) and in that case you better ask that
question in e.g. comp.unix.programmer - but then tell a bit more
about the context, without it your question makes no sense even
if you should be talking about UNIX specific programs.

Regards, Jens
 
L

lasek

Sorry you say the true...i've a mistake to write the correct name of the
function, in effect is 'MMAP' and no 'nmap'..now i post in the correct
forum, thanks a lot.
 
L

lasek

...i've seen a file.pc and inside this, the programmer it used the function
mmap to store a struct with some particular flag permission..so my first
question was..i can use also malloc instead of mmap ? because my know-how
in C...is not enough sufficient...so i've more difficult to understand
mmap rather then malloc.
Thanks...
 
D

dandelion

lasek said:
Hi all...now after a lot of experiments in c programming(two weeks..for
precision), i've seen another strange instraction..and i post you the
question...
Like in the subject...why i must use nmap rather then malloc????.

You are working on an ucLinux system and referrint to mmap()?

If yes... That's OS specific.

If not... That's weird. Choose another compiler.
 
D

dandelion

lasek said:
Sorry you say the true...i've a mistake to write the correct name of the
function, in effect is 'MMAP' and no 'nmap'..now i post in the correct
forum, thanks a lot.

Embedded linux only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top