From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 6 Jan 2005 22:48:00 -0500 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] mallocalign? In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: Topicbox-Message-UUID: 293c4060-eace-11e9-9e20-41e7f4b1d025 > Hi, > I'm wondering how much confidence there is in the mallocalign > implementation. I'm seeing strange behavior in my code using it. > I started seeing a crash when I changed a simple buffer size definition > in one of my modules. On a hunch I replaced mallocalign with > a macro that uses xspanalloc and the problem disappeared. There's not much confidence in the mallocalign implementation. I exercised it a little, but I won't be surprised if there are lurking bugs. Try including in your source file and then before and after the mallocalign run poolcheck(mainmem). If there's a corruption due to mallocalign, the second one should fail. Russ