heloo,
I am new to prgramming in c and I came across the mmap function and decide to see how it works by writing a smal piece of code.
{
void *ptr=0;
int size,stat;
size=getpagesize();
ptr=mmap(0,2,PROT_WRITE,MAP_SHARED,213,size) ;
stat=munmap(ptr,2);
printf("%d",stat);
}
as expected(?), i get a seg fault.
I run gdb and it says:
program recieved SIGSEGV...blah blah,
0x40068f73 in vfprintf() from /lib/libc.so.6 <-------(what does this mean)
how do I interpret such messages.I tried 'info gdb' and found it more cryptic than the debug messages themselves.
soory for the long message,
help anyone?