Simple Virtual Machine
A simple but flexible virtual machine
SVM memory aliases

This module contains API functions to handle SVM memory aliases. More...

Functions

SVM_FUNCTION void svm_memory_add_alias (const void *svm, const SVM_Kernel kernel, const SVM_Value_String alias, const SVM_Value_Pointer pointer)
 This function creates a new alias in a memory from a string value. More...
 
SVM_FUNCTION void svm_memory_add_alias__string (const void *svm, const SVM_Kernel kernel, const SVM_String alias, const SVM_Value_Pointer pointer)
 This function creates a new alias in a memory from a SVM_String. More...
 
SVM_FUNCTION void svm_memory_add_alias__raw (const void *svm, const SVM_Kernel kernel, const char *alias, const SVM_Value_Pointer pointer)
 This function creates a new alias in a memory from a C nul-terminated value. More...
 
SVM_FUNCTION SVM_Boolean svm_memory_has_alias (const void *svm, const SVM_Kernel kernel, const SVM_Value_String alias)
 This function checks whether an alias is defined in a memory from a string value. More...
 
SVM_FUNCTION SVM_Boolean svm_memory_has_alias__string (const void *svm, const SVM_Kernel kernel, const SVM_String alias)
 This function checks whether an alias is defined in a memory from a SVM_String. More...
 
SVM_FUNCTION SVM_Boolean svm_memory_has_alias__raw (const void *svm, const SVM_Kernel kernel, const char *alias)
 This function checks whether an alias is defined in a memory from a C nul-terminated string. More...
 
SVM_FUNCTION SVM_Value_Pointer svm_memory_alias_get_pointer (const void *svm, const SVM_Kernel kernel, const SVM_Value_String alias)
 This function extracts the pointer associated to an alias in a memory from a string value. More...
 
SVM_FUNCTION SVM_Value_Pointer svm_memory_alias_get_pointer__string (const void *svm, const SVM_Kernel kernel, const SVM_String alias)
 This function extracts the pointer associated to an alias in a memory from a SVM_String. More...
 
SVM_FUNCTION SVM_Value_Pointer svm_memory_alias_get_pointer__raw (const void *svm, const SVM_Kernel kernel, const char *alias)
 This function extracts the pointer associated to an alias in a memory from a C nul-terminated string. More...
 
SVM_FUNCTION void svm_memory_remove_alias (const void *svm, const SVM_Kernel kernel, const SVM_Value_String alias)
 This function removes an alias from a memory from a string value. More...
 
SVM_FUNCTION void svm_memory_remove_alias__string (const void *svm, const SVM_Kernel kernel, const SVM_String alias)
 This function removes an alias from a memory from a SVM_String. More...
 
SVM_FUNCTION void svm_memory_remove_alias__raw (const void *svm, const SVM_Kernel kernel, const char *alias)
 This function removes an alias from a memory from a C nul-terminated string. More...
 

Detailed Description

This module contains API functions to handle SVM memory aliases.

Function Documentation

◆ svm_memory_add_alias()

SVM_FUNCTION void svm_memory_add_alias ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_String  alias,
const SVM_Value_Pointer  pointer 
)

This function creates a new alias in a memory from a string value.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to create.
[in]pointerThe memory zone to be identified by the alias.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when the alias already exists.
See also
svm_process_ownership_lock
svm_kernel_get_current
svm_memory_has_alias

◆ svm_memory_add_alias__raw()

SVM_FUNCTION void svm_memory_add_alias__raw ( const void *  svm,
const SVM_Kernel  kernel,
const char *  alias,
const SVM_Value_Pointer  pointer 
)

This function creates a new alias in a memory from a C nul-terminated value.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to create.
[in]pointerThe memory zone to be identified by the alias.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when the alias already exists.
See also
svm_process_ownership_lock
svm_kernel_get_current
svm_memory_has_alias__raw

◆ svm_memory_add_alias__string()

SVM_FUNCTION void svm_memory_add_alias__string ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_String  alias,
const SVM_Value_Pointer  pointer 
)

This function creates a new alias in a memory from a SVM_String.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to create.
[in]pointerThe memory zone to be identified by the alias.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when the alias already exists.
See also
svm_process_ownership_lock
svm_kernel_get_current
svm_memory_has_alias__string

◆ svm_memory_alias_get_pointer()

SVM_FUNCTION SVM_Value_Pointer svm_memory_alias_get_pointer ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_String  alias 
)

This function extracts the pointer associated to an alias in a memory from a string value.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias from which the pointer is extracted .
Returns
The pointer associated to the alias.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
FAILUREinterruption when the alias is not defined.
See also
svm_process_ownership_lock
svm_kernel_get_current
svm_memory_has_alias

◆ svm_memory_alias_get_pointer__raw()

SVM_FUNCTION SVM_Value_Pointer svm_memory_alias_get_pointer__raw ( const void *  svm,
const SVM_Kernel  kernel,
const char *  alias 
)

This function extracts the pointer associated to an alias in a memory from a C nul-terminated string.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias from which the pointer is extracted .
Returns
The pointer associated to the alias.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
FAILUREinterruption when the alias is not defined.
See also
svm_process_ownership_lock
svm_kernel_get_current
svm_memory_has_alias__raw

◆ svm_memory_alias_get_pointer__string()

SVM_FUNCTION SVM_Value_Pointer svm_memory_alias_get_pointer__string ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_String  alias 
)

This function extracts the pointer associated to an alias in a memory from a SVM_String.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias from which the pointer is extracted .
Returns
The pointer associated to the alias.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
FAILUREinterruption when the alias is not defined.
See also
svm_process_ownership_lock
svm_kernel_get_current
svm_memory_has_alias__string

◆ svm_memory_has_alias()

SVM_FUNCTION SVM_Boolean svm_memory_has_alias ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_String  alias 
)

This function checks whether an alias is defined in a memory from a string value.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to check.
Returns
TRUE if the alias is defined, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
See also
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_has_alias__raw()

SVM_FUNCTION SVM_Boolean svm_memory_has_alias__raw ( const void *  svm,
const SVM_Kernel  kernel,
const char *  alias 
)

This function checks whether an alias is defined in a memory from a C nul-terminated string.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to check.
Returns
TRUE if the alias is defined, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
See also
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_has_alias__string()

SVM_FUNCTION SVM_Boolean svm_memory_has_alias__string ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_String  alias 
)

This function checks whether an alias is defined in a memory from a SVM_String.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to check.
Returns
TRUE if the alias is defined, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
See also
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_remove_alias()

SVM_FUNCTION void svm_memory_remove_alias ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_String  alias 
)

This function removes an alias from a memory from a string value.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to delete.

This API function does nothing if the alias did not exist.

Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
See also
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_remove_alias__raw()

SVM_FUNCTION void svm_memory_remove_alias__raw ( const void *  svm,
const SVM_Kernel  kernel,
const char *  alias 
)

This function removes an alias from a memory from a C nul-terminated string.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to delete.

This API function does nothing if the alias did not exist.

Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
See also
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_remove_alias__string()

SVM_FUNCTION void svm_memory_remove_alias__string ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_String  alias 
)

This function removes an alias from a memory from a SVM_String.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]aliasThe alias to delete.

This API function does nothing if the alias did not exist.

Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
See also
svm_process_ownership_lock
svm_kernel_get_current