[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Continuous block of memory to create a variable
From: |
John W. Eaton |
Subject: |
Continuous block of memory to create a variable |
Date: |
Thu, 16 Sep 2004 15:20:01 -0400 |
On 16-Sep-2004, Keith Goodman <address@hidden> wrote:
| Does Octave, like Matlab, require a continuous block of memory to
| create a variable?
What kind of variable? A matrix is made up of a contiguous block of
memory for the elements plus a few other data members for the size,
etc. that are not part of that block of memory.
The structure for an octave_value object (which can contain one of a
number of different data types) is allocated from a larger contiguous
block of memory (in an attempt to speed up allocations) but the
individual components may point to different blocks of memory.
A cell array can contain multiple octave_value objects which need not
be contiguous.
An Octave variable is actually an entry in a symbol table that
ultimately refers to an octave_value object. Symbol records in the
symbol table are currently allocated individually with ::new, so they
are not likely to occupy contiguous blocks of memory.
Why do you ask?
jwe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------