Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!sdcsvax!ucsdhub!jack!crash!pnet01!haitex
From: haitex@pnet01.cts.com (Wade Bickel)
Newsgroups: comp.sys.amiga
Subject: Re: AllocMem()/FreeMem() question.
Message-ID: <2060@crash.cts.com>
Date: Tue, 1-Dec-87 14:56:20 EST
Article-I.D.: crash.2060
Posted: Tue Dec  1 14:56:20 1987
Date-Received: Sat, 5-Dec-87 06:46:06 EST
Sender: news@crash.cts.com
Organization: People-Net [pnet01], El Cajon, CA
Lines: 30


dillon@CORY.BERKELEY.EDU (Matt Dillon) writes:
>
>	Here's a question:
>
>	If I AllocMem() a block of memory, can I FreeMem() a subsegment of
>that block (being careful to do everything on 8 byte boundries).  That is:
>
>	ptr = AllocMem(16, MEMF_PUBLIC);
>	FreeMem(ptr+8,8);
>
>	so ptr now points to 8 bytes allocated memory.  Then at some point
>	later on:
>
>	FreeMem(ptr, 8);
>
>				???
>
>					-Matt


        Seems that you should be able to, though I would think that
      a structured approach to coding your allocations would avoid the
      need to do so.  The syntax and logic seem good, TRY IT!

                                                        Wade.

UUCP: {cbosgd, hplabs!hp-sdd, sdcsvax, nosc}!crash!pnet01!haitex
ARPA: crash!pnet01!haitex@nosc.mil
INET: haitex@pnet01.CTS.COM