13a8a05a4SAxel Dörfler/*
2268403d4SAxel Dörfler * Copyright 2003-2007, Axel D��rfler, axeld@pinc-software.de. All rights reserved.
3268403d4SAxel Dörfler * Distributed under the terms of the MIT License.
43a8a05a4SAxel Dörfler*/
53a8a05a4SAxel Dörfler
63a8a05a4SAxel Dörfler
73a8a05a4SAxel Dörfler#include <boot/platform.h>
8a6c27d15SAxel Dörfler
93a8a05a4SAxel Dörfler#include <stdlib.h>
10a6c27d15SAxel Dörfler#include <stdio.h>
113a8a05a4SAxel Dörfler
123a8a05a4SAxel Dörfler
133a8a05a4SAxel Dörflerstatus_t
14268403d4SAxel Dörflerplatform_allocate_region(void **_address, size_t size, uint8 protection,
15268403d4SAxel Dörfler	bool exactAddress)
163a8a05a4SAxel Dörfler{
17268403d4SAxel Dörfler	printf("platform_allocate_region(address = %p, size = %lu, protection = %u, exactAdress = %d)\n",
18268403d4SAxel Dörfler		*_address, size, protection, exactAddress);
19a6c27d15SAxel Dörfler
203a8a05a4SAxel Dörfler	void *address = malloc(size);
213a8a05a4SAxel Dörfler	if (address == NULL)
223a8a05a4SAxel Dörfler		return B_NO_MEMORY;
233a8a05a4SAxel Dörfler
243a8a05a4SAxel Dörfler	*_address = address;
253a8a05a4SAxel Dörfler	return B_OK;
263a8a05a4SAxel Dörfler}
273a8a05a4SAxel Dörfler
283a8a05a4SAxel Dörfler
293a8a05a4SAxel Dörflerstatus_t
303a8a05a4SAxel Dörflerplatform_free_region(void *address, size_t size)
313a8a05a4SAxel Dörfler{
323a8a05a4SAxel Dörfler	free(address);
333a8a05a4SAxel Dörfler	return B_OK;
343a8a05a4SAxel Dörfler}
353a8a05a4SAxel Dörfler
36