Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Functions
SVM memory aliases
SVM memories

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.

## 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to create.
  [in] | pointer | The memory zone to be identified by the alias.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to create.
  [in] | pointer | The memory zone to be identified by the alias.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to create.
  [in] | pointer | The memory zone to be identified by the alias.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias from which the pointer is extracted .

Returns
  The pointer associated to the alias.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias from which the pointer is extracted .

Returns
  The pointer associated to the alias.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias from which the pointer is extracted .

Returns
  The pointer associated to the alias.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to check.

Returns
  TRUE if the alias is defined, FALSE otherwise.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to check.

Returns
  TRUE if the alias is defined, FALSE otherwise.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to check.

Returns
  TRUE if the alias is defined, FALSE otherwise.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to delete.

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

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to delete.

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

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | alias | The alias to delete.

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

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption 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