Andrew Eggenberger, le sam. 24 avril 2021 17:29:23 -0500, a ecrit:
> Thanks! But now I'm getting a segfault when I try to vm_deallocate. It seems 
> to
> be the result of calling memchr on the vm_allocated buffer. Here is the
> function that calls memchr:

Where is the segfault exactly? Are you sure that the file contains a
\0 ?

> memchr returns a pointer to the first instance of the char argument, but does
> it also change where its first argument points?  

? functions cannot change their parameters. More precisely they can
change their parameter, but cannot magically change whatever the caller
happened to pass to the call.

Samuel

Reply via email to