[futurebasic] Re: [FB] Memory move question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1998 : Group Archive : Group : All Groups

From: Rick Brown <rbrown@...>
Date: Sat, 31 Oct 1998 18:35:46 -0600
> Is memory something that can move at any time without cause? Or is it
> something that can move when we do something to memory that alerts the
> memory manager?

Memory blocks can move whenever you execute a statement that (directly
or indirectly) allocates a new block in the heap, or increases the size
of an existing one.  This includes both relocatable (handle-type) blocks
and non-relocatable (pointer-type) blocks.  So for example, creating a
new window or a new edit field could move blocks; likewise loading a
resource, opening a file, etc.

Memory blocks can also move if you execute a statement to explicitly
maximize contiguous free space in the heap, such as MEM(_maxAvail).

BLOCKMOVE, in particular, does NOT cause blocks to move (kind of a
misnomer, ain't it?)

- Rick