bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory management for io_read(), etc.


From: Samuel Thibault
Subject: Re: Memory management for io_read(), etc.
Date: Sun, 25 Apr 2021 00:43:18 +0200
User-agent: NeoMutt/20170609 (1.8.3)

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

[Prev in Thread] Current Thread [Next in Thread]