From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: one more about memory alloc - free memory of needed amount only Date: 24 Aug 2000 12:39:43 GMT Organization: Aachen University of Technology (RWTH) Lines: 13 Message-ID: <8o352f$d6v$1@nets3.rz.RWTH-Aachen.DE> References: <39A4EB1B DOT 29871 DOT 12C6F4 AT localhost> <8o2m1l$6tb$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <8o31dp$c0t$1 AT antares DOT lu DOT erisoft DOT se> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 967120783 13535 137.226.32.75 (24 Aug 2000 12:39:43 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 24 Aug 2000 12:39:43 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Martin Stromberg wrote: > Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) wrote: > : unsigned char * realptr = malloc(300+63); > : some_type * ptr_to_use = (some_type *) > : (realptr + (((unsigned long) realptr) % 64)); > I think you mean "(realptr + (64 - (((unsigned long) realptr) % 64)))". > Try mind-running it with realptr = 1, e. g. Yep. Sorry if that caused any confusion. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.