kernel: port sandbox components
This commit is contained in:
@@ -19,12 +19,10 @@
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
*/
|
||||
#include "socks/types.h"
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <socks/types.h>
|
||||
#include <socks/libc/string.h>
|
||||
#include <socks/memblock.h>
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
@@ -252,8 +250,7 @@ static phys_addr_t do_alloc(size_t size)
|
||||
}
|
||||
|
||||
if (allocated_base == ADDR_MAX) {
|
||||
fprintf(stderr, "memblock: cannot allocate %zu byte buffer!\n", size);
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int status = memblock_add_range(&memblock.reserved, allocated_base, size, MEMBLOCK_ALLOC);
|
||||
|
||||
Reference in New Issue
Block a user