コード例 #1
0
void *
Impl_malloc_zone_valloc(malloc_zone_t *zone, size_t size) {
	OSMemoryZone* osm = (OSMemoryZone*)zone;
	if (osm->global_zone) {
		return valloc(size);
	}
	else {
		OSHalt("Impl_malloc_zone_valloc for mspaces isn't implemented yet!");
	}
}
コード例 #2
0
int
kevent64(int kq,
		 const struct kevent64_s *changelist,
		 int nchanges,
		 struct kevent64_s *eventlist,
		 int nevents,
		 unsigned int flags,
         const struct timespec *timeout)
{
	OSHalt("kevent64: why would you do this?");
}
コード例 #3
0
void _OSInitializeMemoryZones(void) {
	/* create the default memory zone */

	if (default_zone != NULL) {
		OSHalt("default_zone already present!");
	}

	/* 0xfee1dead is the magic that stops the create thing from creating a mspace */
	default_zone = (OSMemoryZone*)malloc_create_zone(0, 0xfee1dead);
	default_zone->global_zone = TRUE;
	default_zone->basic_zone.zone_name = "DefaultMallocZone";

	OSLog("_OSInitializeMemoryZones: all set, %d zones inited, default zone @ %p", MAX_ZONES, default_zone);
}
コード例 #4
0
/*
 * OSMemoryZone
 */
OSMemoryZone* _OSGetFirstAvailableMemoryZone(void) {
	lll_lock(&malloc_lock);

	OSMemoryZone* osm = NULL;
	for (int i = 0; i < MAX_ZONES; i++) {
		OSMemoryZone* tosm = &zones[i];
		if (tosm->registred == FALSE) {
			osm = tosm;
		}
	}

	if (osm != NULL) {
		osm->registred = TRUE;
	}
	else {
		OSHalt("out of avail malloc zones (max: %d)", MAX_ZONES);
	}

	lll_unlock(&malloc_lock);

	return (OSMemoryZone*)osm;
}
コード例 #5
0
ファイル: gsAssert.c プロジェクト: NeoAnomaly/xray
	void _gsDebugAssert(const char *string)
	{
		OSHalt(string);
		
	}
コード例 #6
0
void __reserved_time_1(void) {
	OSHalt("__reserved_time_1");
}
コード例 #7
0
void
__stack_chk_fail()
{
	OSHalt("__stack_chk_fail(): stack overflow?");
}
コード例 #8
0
void
malloc_destroy_zone(malloc_zone_t *zone) {
	OSHalt("malloc_destroy_zone: not yet implemented!");
}
コード例 #9
0
/*
	Default zone handlers which work using mspaces.
 */
malloc_zone_t *
Impl_malloc_create_zone(vm_size_t start_size, unsigned flags) {
	OSHalt("Impl_malloc_create_zone is not meant to be called!");
}
コード例 #10
0
void __reserved_malloc_1() {
	OSHalt("called a reserved function");
}
コード例 #11
0
unsigned int malloc_zone_batch_malloc(malloc_zone_t *zone, size_t size, void **results, unsigned int num_requested)
{
	OSHalt("malloc_zone_batch_malloc");
}