aos/lib/mm/mm.c
Daniel Schwyn 6d444bf552 Main handout
Signed-off-by: Daniel Schwyn <daniel.schwyn@inf.ethz.ch>
2022-03-03 14:57:51 +01:00

58 lines
1.3 KiB
C

/**
* \file
* \brief A library for managing physical memory (i.e., caps)
*/
/*
* Copyright (c) 2008, 2011, ETH Zurich.
* Copyright (c), 2022, The University of British Columbia
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
*/
#include <mm/mm.h>
#include <aos/debug.h>
#include <aos/solution.h>
errval_t mm_init(struct mm *mm, enum objtype objtype,
slab_refill_func_t slab_refill_func,
slot_alloc_t slot_alloc_func,
slot_refill_t slot_refill_func,
void *slot_alloc_inst)
{
return LIB_ERR_NOT_IMPLEMENTED;
}
void mm_destroy(struct mm *mm)
{
assert(!"NYI");
}
errval_t mm_add(struct mm *mm, struct capref cap)
{
return LIB_ERR_NOT_IMPLEMENTED;
}
errval_t mm_alloc_aligned(struct mm *mm, size_t size, size_t alignment, struct capref *retcap)
{
return LIB_ERR_NOT_IMPLEMENTED;
}
errval_t mm_alloc(struct mm *mm, size_t size, struct capref *retcap)
{
return mm_alloc_aligned(mm, size, BASE_PAGE_SIZE, retcap);
}
errval_t mm_free(struct mm *mm, struct capref cap)
{
return LIB_ERR_NOT_IMPLEMENTED;
}