Platforms to show: All Mac Windows Linux Cross-Platform
MemoryBlockMBS.Address as Int64
property, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The address of the memory.
Notes:
This value became 64bit to avoid integer overflows.
(Read only property)
property, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The address of the memory.
Notes:
This value became 64bit to avoid integer overflows.
(Read only property)
class MemoryBlockMBS
class, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 5.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: A class to hold a memoryblock.
Example:
Realbasics memoryblocks have two bad things:
- they are limited to 1 GB on Mac OS X and Mac OS Classic
- they take a lot of time to create them
- they take a lot of real memory
Realbasic allocates the memory and fills it with zeros.
The plugin in contrast uses zero filled pages to create the memoryblock which nearly take no time to create them and it does only need virtual memory until the memory is really used which saved swapping space.
class, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 5.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: A class to hold a memoryblock.
Example:
dim m as new MemoryBlockMBS
if m.Create(2000) then
// copy struing into memory
m.Memory.StringValue(0,5)="Hello"
// and read again
MsgBox m.Memory.StringValue(0,5)
end if
Notes: Realbasics memoryblocks have two bad things:
- they are limited to 1 GB on Mac OS X and Mac OS Classic
- they take a lot of time to create them
- they take a lot of real memory
Realbasic allocates the memory and fills it with zeros.
The plugin in contrast uses zero filled pages to create the memoryblock which nearly take no time to create them and it does only need virtual memory until the memory is really used which saved swapping space.
MemoryBlockMBS.Close
method, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 5.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The destructor.
Notes:
There is no need to call this method except you want to free all resources of this object now without waiting for Realbasic to do it for you.
(e.g. some Realbasic versions crash on Windows if there are plugin objects not closed.)
method, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 5.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The destructor.
Notes:
There is no need to call this method except you want to free all resources of this object now without waiting for Realbasic to do it for you.
(e.g. some Realbasic versions crash on Windows if there are plugin objects not closed.)
MemoryBlockMBS.Create(size as Int64) as boolean
method, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Creates a new memoryblock.
Example:
Returns true on success and false on failure.
Size can be any positive value up to &h7FFFFFFF (=2^31-1).
Size became 64bit to avoid integer overflows.
method, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Creates a new memoryblock.
Example:
dim m as MemoryBlockMBS
dim n as MemoryBlock
dim t as integer
const size=2200000000
// RB: up to 1 GigaByte
// Plugin: up to 2 GigaByte - 1 Byte
m=New MemoryBlockMBS
t=ticks
if m.Create(size) then
n=m.Memory
MsgBox str(ticks-t)
end if
t=ticks
n=NewMemoryBlock(size)
if n<>nil then
MsgBox str(ticks-t)
end if
Notes: Returns true on success and false on failure.
Size can be any positive value up to &h7FFFFFFF (=2^31-1).
Size became 64bit to avoid integer overflows.
MemoryBlockMBS.Memory as Memoryblock
property, MemoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 5.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The memoryblock to access this memory.
Notes:
Keep a reference to the MemoryBlockMBS object as long as you use this memoryblock object.
(Read only property)
property, MemoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 5.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The memoryblock to access this memory.
Notes:
Keep a reference to the MemoryBlockMBS object as long as you use this memoryblock object.
(Read only property)
MemoryBlockMBS.Resize(Size as Int64) as boolean
method, MemoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Tries to resize the memorybock to the new size.
Example:
Returns true on success.
If false is returned, the memoryblockMBS is not touched.
If the new size is smaller, data is lost as the memoryblock is cut.
If the new size is bigger, the memoryblock is resized. Or if that does not work, a new memoryblock is created and data is copied. New bytes will be zero.
method, MemoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Tries to resize the memorybock to the new size.
Example:
dim m as new MemoryBlockMBS
if m.Create(1000) then
MsgBox str(m.Size)
if m.Resize(2000) then
MsgBox str(m.Size)
end if
end if
Notes: Returns true on success.
If false is returned, the memoryblockMBS is not touched.
If the new size is smaller, data is lost as the memoryblock is cut.
If the new size is bigger, the memoryblock is resized. Or if that does not work, a new memoryblock is created and data is copied. New bytes will be zero.
MemoryBlockMBS.Size as Int64
property, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The size of this memoryblock.
Notes:
This value became 64bit to avoid integer overflows.
(Read only property)
property, memoryBlock, MBS REALbasic Util Plugin (Memory), class MemoryBlockMBS, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The size of this memoryblock.
Notes:
This value became 64bit to avoid integer overflows.
(Read only property)
The items on this page are in the following plugins: MBS REALbasic Util Plugin.
Links
MBS Realbasic Plugins - Christians Software aus Nickenich