1 /* 2 ** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 ** Distributed under the terms of the OpenBeOS License. 4 */ 5 6 7 #include <boot/platform.h> 8 9 #include <stdlib.h> 10 #include <stdio.h> 11 12 13 status_t 14 platform_allocate_region(void **_address, size_t size, uint8 protection) 15 { 16 printf("platform_allocate_region(address = %p, size = %lu, protection = %u)\n", 17 *_address, size, protection); 18 19 void *address = malloc(size); 20 if (address == NULL) 21 return B_NO_MEMORY; 22 23 *_address = address; 24 return B_OK; 25 } 26 27 28 status_t 29 platform_free_region(void *address, size_t size) 30 { 31 free(address); 32 return B_OK; 33 } 34 35