/* * physmem.c - Physical memory allocator * * Written 2011 by Werner Almesberger * Copyright 2011 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include /* * dummy implementation */ void **calloc_phys_vec(size_t n, size_t size) { void **vec; int i; vec = sbrk(sizeof(void *)*n); for (i = 0; i != n; i++) { vec[i] = sbrk(size); memset(vec[i], 0, size); } return vec; }