mono-api-codegen.html

Code manager

mono_code_manager_commit
void mono_code_manager_commit (MonoCodeManager *cman, void *data, int size, int newsize)

Parameters

cman:
a code manager
data:
the pointer returned by mono_code_manager_reserve ()
size:
the size requested in the call to mono_code_manager_reserve ()
newsize:
the new size to reserve
Remarks

If we reserved too much room for a method and we didn't allocate already from the code manager, we can get back the excess allocation for later use in the code manager.

mono_code_manager_destroy
void mono_code_manager_destroy (MonoCodeManager *cman)

Parameters

cman:
a code manager
Remarks

Free all the memory associated with the code manager cman.

mono_code_manager_foreach
void mono_code_manager_foreach (MonoCodeManager *cman, MonoCodeManagerFunc func, void *user_data)

Parameters

cman:
a code manager
func:
a callback function pointer
user_data:
additional data to pass to func
Remarks

Invokes the callback func for each different chunk of memory allocated in the code manager cman.

mono_code_manager_invalidate
void mono_code_manager_invalidate (MonoCodeManager *cman)

Parameters

cman:
a code manager
Remarks

Fill all the memory with an invalid native code value so that any attempt to execute code allocated in the code manager cman will fail. This is used for debugging purposes.

mono_code_manager_new_dynamic
MonoCodeManager* mono_code_manager_new_dynamic (void)

Returns

the new code manager
Remarks

Creates a new code manager suitable for holding native code that can be used for single or small methods that need to be deallocated independently of other native code.

mono_code_manager_new
MonoCodeManager* mono_code_manager_new (void)

Returns

the new code manager
Remarks

Creates a new code manager. A code manager can be used to allocate memory suitable for storing native code that can be later executed. A code manager allocates memory from the operating system in large chunks (typically 64KB in size) so that many methods can be allocated inside them close together, improving cache locality.