mono_sha1_init
mono_sha1_update
mono_sha1_get_digest_from_file
| filename | file name |
| digest | 20-byte buffer receiving the hash code. |
Get the SHA-1 hash of a file. The result is put in the 20-byte buffer digest.
If an IO error happens the value in digest is not updated.
mono_sha1_get_digest
mono_sha1_final
mono_md5_init
mono_md5_update
mono_md5_get_digest_from_file
| filename | file name |
| digest | 16-byte buffer receiving the hash code. |
Get the MD5 hash of a file. The result is put in the 16-byte buffer digest.
If an IO error happens the value in digest is not updated.
mono_md5_get_digest
| buffer | byte buffer |
| buffer_size | buffer size (in bytes) |
| digest | 16-byte buffer receiving the hash code. |
Get the MD5 hash of a buffer. The result is put in the 16-byte buffer digest.
mono_md5_final
mono_digest_get_public_token
Get the public token from public key data. token must point to at least 8 bytes of storage.
GHashTable is used when you need to store object references into a hashtable, objects stored in a MonoGHashTable are properly tracked by the garbage collector.
The MonoGHashTable data type has the same API as the GLIB.
mono_g_hash_table_destroy
mono_g_hash_table_foreach
mono_g_hash_table_foreach_remove
mono_g_hash_table_insert
mono_g_hash_table_lookup
mono_g_hash_table_lookup_extended
mono_g_hash_table_remove
mono_g_hash_table_replace
mono_g_hash_table_size
Memory pools are a convenient way of tracking memory allocations that are used for one specific task, they are also faster than using the standard memory allocation procedures, as they are designed to be used only by a single thread at a time.
MonoMemPool objects are not thread safe, which means that you should not share the objects across multiple threads without providing proper locking around it (unlike malloc and free which are thread safe).
When a MonoMemPool is released with mono_mempool_destroy all of the of the memory allocated from that memory pool with mono_mempool_alloc and mono_mempool_alloc0 is released.
mono_mempool_new
mono_mempool_destroy
| pool | the memory pool to destroy |
Free all memory associated with this pool.
mono_mempool_alloc
| pool | the memory pool to use |
| size | size of the memory block |
Allocates a new block of memory in pool .
mono_mempool_alloc0
same as mono_mempool_alloc, but fills memory with zero.
mono_mempool_invalidate
| pool | the memory pool to invalidate |
Fill the memory associated with this pool to 0x2a (42). Useful for debugging.
mono_mempool_stats
| pool | the memory pool we need stats for |
Print a few stats about the mempool: - Total memory allocated (malloced) by mem pool - Number of chunks/blocks memory is allocated in - How much memory is available to dispense before a new malloc must occur?
mono_mempool_contains_addr
Determines whether addr is inside the memory used by the mempool.
MonoBitsets are a set of routines used to manipulate sets of bits.
mono_bitset_alloc_size
| max_size | The number of bits you want to hold |
| flags | unused |
mono_bitset_mem_new.mono_bitset_clear
| set | bitset ptr |
| pos | unset bit at this pos |
Unset bit at pos, counting from 0.
mono_bitset_clear_all
| set | bitset ptr |
Unset all bits.
mono_bitset_clone
| set | bitset ptr to clone |
| new_size | number of bits the cloned bitset can hold |
MONO_BITSET_DONT_FREE
unset in cloned bitset. If new_size is 0, the cloned object is just
as big.mono_bitset_copyto
| src | bitset ptr to copy from |
| dest | bitset ptr to copy to |
Copy one bitset to another.
mono_bitset_count
| set | bitset ptr |
mono_bitset_equal
| src | bitset ptr |
| src1 | bitset ptr |
TRUE if their size are the same and the same bits are set in
both bitsets.mono_bitset_find_first
| set | bitset ptr |
| pos | pos to search after (not including) |
-1 if no bit set is found.mono_bitset_find_last
| set | bitset ptr |
| pos | pos to search before (not including) |
-1 if no set bit is found.mono_bitset_find_start
| set | bitset ptr |
mono_bitset_find_first (set, -1) but faster.mono_bitset_foreach
| set | bitset ptr |
| func | Function to call for every set bit |
| data | pass this as second arg to func |
mono_bitset_free
mono_bitset_intersection
| dest | bitset ptr to hold intersection |
| src | bitset ptr to copy |
Make intersection of one bitset and another.
mono_bitset_invert
| set | bitset ptr |
Flip all bits.
mono_bitset_mem_new
| mem | The location the bitset is stored |
| max_size | The number of bits you want to hold |
| flags | bitfield of flags |
Return mem, which is now a initialized bitset of size max_size. It is
not freed even if called with mono_bitset_free. mem must be at least
as big as mono_bitset_alloc_size returns for the same max_size.
mono_bitset_new
| max_size | The numer of bits you want to hold |
| flags | bitfield of flags |
mono_bitset_free.mono_bitset_set
| set | bitset ptr |
| pos | set bit at this pos |
Set bit at pos, counting from 0.
mono_bitset_set_all
| set | bitset ptr |
Set all bits.
mono_bitset_size
| set | bitset ptr |
mono_bitset_sub
| dest | bitset ptr to hold bitset - src |
| src | bitset ptr to copy |
Unset all bits in dest that are set in src.
mono_bitset_test
| set | bitset ptr |
| pos | test bit at this pos |
mono_bitset_test_bulk
| set | bitset ptr |
| pos | test bit at this pos |
mono_bitset_union
| dest | bitset ptr to hold union |
| src | bitset ptr to copy |
Make union of one bitset and another.
mono_bitset_find_first_unset
| set | bitset ptr |
| pos | pos to search after (not including) |
-1 if no bit set is found.mono_bitset_intersection_2
| dest | bitset ptr to hold intersection |
| src1 | first bitset |
| src2 | second bitset |
Make intersection of two bitsets
mono_signbit_double
mono_signbit_float
To wrap a function pointer into something that the Mono runtime can consume, you should use the mono_create_ftnptr. This is only important if you plan on running on the IA64 architecture. Otherwise you can just use the function pointer address.
mono_create_ftnptr
Given a function address, create a function descriptor for it. This is only needed on some platforms.
This is an internal profiler interface. In general, users would not be using this interface, but would be using the profiler interface.
These methods must be called to notify the profiler of an event that must be recorded. Mono's JIT engine currently calls these routines, but if you are extending Mono in some way these are the methods that you might invoke to notify the profiler of an event.
mono_profiler_load
Loads a profiler module based on the specified description. desc can be
of the form name:args or just name. For example, log:sample and
log will both load libmono-profiler-log.so. The description is passed
to the module after it has been loaded. If the specified module has already
been loaded, this function has no effect.
A module called foo should declare an entry point like so:
void mono_profiler_init_foo (const char *desc)
{
}
This function is not async safe.
This function may only be called by embedders prior to running managed code.
mono_profiler_allocation
mono_profiler_stat_hit
mono_profiler_thread_start
mono_profiler_thread_end
mono_profiler_appdomain_event
mono_profiler_appdomain_loaded
mono_profiler_assembly_event
mono_profiler_assembly_loaded
mono_profiler_class_event
mono_profiler_class_loaded
mono_profiler_code_transition
mono_profiler_method_end_jit
mono_profiler_method_enter
mono_profiler_method_jit
mono_profiler_method_leave
mono_profiler_module_event
mono_profiler_module_loaded
mono_profiler_shutdown
mono_profiler_startup
mono_profiler_gc_event
mono_profiler_gc_heap_resize