Removal of non-Haiku target platform logic from build system (part 1.)
[haiku.git] / src / tests / system / boot / loader / platform_mmu.cpp
blob87c6b622b1835a808221c6ac9a997e533f8969d6
1 /*
2 * Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <boot/platform.h>
9 #include <stdlib.h>
10 #include <stdio.h>
13 status_t
14 platform_allocate_region(void **_address, size_t size, uint8 protection,
15 bool exactAddress)
17 printf("platform_allocate_region(address = %p, size = %lu, protection = %u, exactAdress = %d)\n",
18 *_address, size, protection, exactAddress);
20 void *address = malloc(size);
21 if (address == NULL)
22 return B_NO_MEMORY;
24 *_address = address;
25 return B_OK;
29 status_t
30 platform_free_region(void *address, size_t size)
32 free(address);
33 return B_OK;