- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, I know it's not a good idea to dig into things like this, BUT:
I'm writing an allocation tracker. It insinuates itself so it gets called on allocate and deallocate statements, and it keeps track of memory usage.
I'm able to extract the obvious info from the array descriptors, such as number of dimensions, elements, and element sizes. But the flags word has me mostly stumped. There seems to be a flag in bit 0, another one in bit 2, another one in bit 4. But the compiler goes to lots of trouble to stuff $82 in the high byte too.
Any info on what all these bits mean?
And has this info changed from version to version? I'm using 9.1.
Thanks!
I'm writing an allocation tracker. It insinuates itself so it gets called on allocate and deallocate statements, and it keeps track of memory usage.
I'm able to extract the obvious info from the array descriptors, such as number of dimensions, elements, and element sizes. But the flags word has me mostly stumped. There seems to be a flag in bit 0, another one in bit 2, another one in bit 4. But the compiler goes to lots of trouble to stuff $82 in the high byte too.
Any info on what all these bits mean?
And has this info changed from version to version? I'm using 9.1.
Thanks!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The format is documented in the Building Applications manual, chapter on mixed language programming. I have a side task to provide clearer documentation - what is there is usable but is a bit hard to decipher in places. I'm not aware of the high byte of the flags word being used for anything (but I'll check my sources tomorrow and verify that.)
The format has not changed since 8.0 (and we'll strongly resist anyone telling us to change it.) It IS different on the 64-bit platforms (every field is 64-bits). And it is different from CVF.
The format has not changed since 8.0 (and we'll strongly resist anyone telling us to change it.) It IS different on the 64-bit platforms (every field is 64-bits). And it is different from CVF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>I'm not aware of the high byte of the flags word being used for
anything (but I'll check my sources tomorrow and verify that.)
Oops, those are bits I gleaned from looking at CVF 6.x output! IVF 9.1 doesnt set those bits up there. And you call _for_allocate DOT, CVF didnt use the dot. Otherwise the bits seem mostly similar.
Thanks,
George
Oops, those are bits I gleaned from looking at CVF 6.x output! IVF 9.1 doesnt set those bits up there. And you call _for_allocate DOT, CVF didnt use the dot. Otherwise the bits seem mostly similar.
Thanks,
George
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The flag bits defined are:
0 - descriptor is valid (associated() is true)
1 - descriptor points to something that cannot be deallocated (array section, etc.)
2 - descriptor points to contiguous memory
all others reserved and must be zero
Fields (all either 32 or 64 bits accordingly)
A0 (address of array(0,0,0,0...)
size of one array element
offset from A0 to actual start of array
flags
number of dimensions
reserved (must be initialized to zero)
This is followed by an array of bounds information groups, one for each dimension, with fields:
extent
inter-element spacing
lower bound
0 - descriptor is valid (associated() is true)
1 - descriptor points to something that cannot be deallocated (array section, etc.)
2 - descriptor points to contiguous memory
all others reserved and must be zero
Fields (all either 32 or 64 bits accordingly)
A0 (address of array(0,0,0,0...)
size of one array element
offset from A0 to actual start of array
flags
number of dimensions
reserved (must be initialized to zero)
This is followed by an array of bounds information groups, one for each dimension, with fields:
extent
inter-element spacing
lower bound

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page