Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- #include "allocator.h"
- struct mem_cell {
- int *address;
- int *size;
- char *identifier;
- };
- struct mem_cell memory[MEM_SIZE];
- int elements = MEM_SIZE / sizeof(struct mem_cell);
- void print_memory_map() {
- printf("memory_map: ");int i;int j;
- for(i = 0; i <= MEM_SIZE; i++) {
- if (memory[i] != NULL) {
- for (j = 0; j <= memory[j]->size; j++) {
- printf("%c", memory[i]->identifier);
- }
- } else {
- printf("%d", 0);
- }
- }
- printf("\n");
- }
Add Comment
Please, Sign In to add comment