🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #730

Re: Common malloc/free practice violates ANSI standard ?

#730
From: T. William Wells
Date: Thu, 19 Oct 1989 10:13
11 lines
853 bytes
: * assigning a void* to an OBJ* involves rounding up to an even address

: * assigning an OBJ* to a void* involves no change of address

The standard requires that casting from (void*) to (OBJ*) and back
give pointers that compare equal and point to the same object.
Free will have no problems with it.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill@twwells.com
Technical Details
Message-ID: <1989Oct19.101306.16791@twwells.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!twwells!bill
References: <1989Oct14.043811.669@anucsd.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!twwells!bill
From: bill@twwells.com (T. William Wells)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: Common malloc/free practice violates ANSI standard ?
Message-ID: <1989Oct19.101306.16791@twwells.com>
Date: 19 Oct 89 10:13:06 GMT
References: <1989Oct14.043811.669@anucsd.oz>
Organization: None, Ft. Lauderdale, FL
Lines: 11