/* * mono_thread_info_get_stack_bounds: * * Return the address and size of the current threads stack. Return NULL as the * stack address if the stack address cannot be determined. */ void mono_thread_info_get_stack_bounds (guint8 **staddr, size_t *stsize) { guint8 *current = (guint8 *)&stsize; mono_threads_core_get_stack_bounds (staddr, stsize); if (!*staddr) return; /* Sanity check the result */ g_assert ((current > *staddr) && (current < *staddr + *stsize)); /* When running under emacs, sometimes staddr is not aligned to a page size */ *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1)); }
/* * mono_thread_info_get_stack_bounds: * * Return the address and size of the current threads stack. Return NULL as the * stack address if the stack address cannot be determined. */ void mono_thread_info_get_stack_bounds (guint8 **staddr, size_t *stsize) { return mono_threads_core_get_stack_bounds (staddr, stsize); }