Compare commits
4 Commits
df2ed3acda
...
130eaa54f0
Author | SHA1 | Date | |
---|---|---|---|
130eaa54f0 | |||
9bb7f65de1 | |||
c4c6011427 | |||
dd8ecf50db |
TP/TP2/rendu
@ -1,10 +1,20 @@
|
|||||||
SRC = $(wildcard *.c)
|
SRC = $(wildcard *.c)
|
||||||
OBJ = $(filter-out build/main.o build/test.o, $(SRC:%.c=build/%.o))
|
OBJ = $(filter-out build/main.o build/test.o, $(SRC:%.c=build/%.o))
|
||||||
FLAGS = -Wall -Wextra -g -O3
|
FLAGS = -Wall -Wextra -g -O3
|
||||||
|
TEST_SRCDIR = tests
|
||||||
|
|
||||||
all: build/test
|
FAIL_TESTS_SRC += $(wildcard $(TEST_SRCDIR)/fail/*.c)
|
||||||
|
SUCC_TESTS_SRC += $(wildcard $(TEST_SRCDIR)/success/*.c)
|
||||||
|
TESTS_OBJ = $(FAIL_TESTS_SRC:$(TEST_SRCDIR)/fail/%.c=build/test-fail-%) $(SUCC_TESTS_SRC:$(TEST_SRCDIR)/success/%.c=build/test-success-%)
|
||||||
|
|
||||||
build/test: test.c $(OBJ)
|
all: build-tests
|
||||||
|
|
||||||
|
build-tests: $(TESTS_OBJ)
|
||||||
|
|
||||||
|
build/test-fail-%: tests/fail/%.c $(OBJ)
|
||||||
|
gcc $^ -o $@ $(FLAGS)
|
||||||
|
|
||||||
|
build/test-success-%: tests/success/%.c $(OBJ)
|
||||||
gcc $^ -o $@ $(FLAGS)
|
gcc $^ -o $@ $(FLAGS)
|
||||||
|
|
||||||
build/%.o: %.c %.h
|
build/%.o: %.c %.h
|
||||||
|
14
TP/TP2/rendu/README.md
Normal file
14
TP/TP2/rendu/README.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# TP2
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
Exécuter tous les tests et s'arrêter quand l'un produit un résultat différent de celui attendu
|
||||||
|
```bash
|
||||||
|
./make.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Implémentation
|
||||||
|
|
||||||
|
Pour les différents processus:
|
||||||
|
- une structure de `(VMap, pid) list` est utilisée pour gérer les VMaps reliées à chaque processus
|
||||||
|
- Dès qu'une VMap est récupérée, elle est verrouillée (Un mutex par VMap), ne fonctionne pas
|
25
TP/TP2/rendu/make.sh
Executable file
25
TP/TP2/rendu/make.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
test_failed () {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
make build-tests
|
||||||
|
|
||||||
|
for file in build/test-fail-*; do
|
||||||
|
echo "===== $file =====";
|
||||||
|
$file &>/dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "$file should have failed"
|
||||||
|
test_failed
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in build/test-success-*; do
|
||||||
|
echo "===== $file =====";
|
||||||
|
$file &>/dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "$file failed"
|
||||||
|
test_failed
|
||||||
|
fi
|
||||||
|
done
|
48
TP/TP2/rendu/tests/fail/bad_copy.c
Normal file
48
TP/TP2/rendu/tests/fail/bad_copy.c
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "../../vmap.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
Memory* mem = memory_init(-1);
|
||||||
|
int pid1 = 12;
|
||||||
|
int pid2 = 24;
|
||||||
|
|
||||||
|
char* real1 = malloc(sizeof(char)*32);
|
||||||
|
real1[0] = 'h';
|
||||||
|
real1[1] = 'e';
|
||||||
|
real1[2] = 'l';
|
||||||
|
real1[3] = 'l';
|
||||||
|
real1[4] = 'o';
|
||||||
|
real1[5] = '!';
|
||||||
|
real1[6] = '\0';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
char* data1 = my_malloc(mem, 32*sizeof(char), pid1);
|
||||||
|
char* data2 = my_malloc(mem, 32*sizeof(char), pid2);
|
||||||
|
|
||||||
|
vmap_copy_from_memory(mem, real1, data1, 8, pid1);
|
||||||
|
|
||||||
|
|
||||||
|
my_copy(mem, data1, data2, 32*sizeof(char), pid1); //! src and dst have different PIDs
|
||||||
|
|
||||||
|
char* real = malloc(sizeof(char)*32);
|
||||||
|
|
||||||
|
vmap_copy_to_memory(mem, data2, real, 7, pid2);
|
||||||
|
|
||||||
|
if (strcmp(real, real1)) {
|
||||||
|
printf("%d\n", strcmp(real, real1));
|
||||||
|
fprintf(stderr, "copy test failed\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
free(real);
|
||||||
|
free(real1);
|
||||||
|
|
||||||
|
my_free(mem, data1, pid1);
|
||||||
|
my_free(mem, data2, pid2);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
27
TP/TP2/rendu/tests/fail/bad_free.c
Normal file
27
TP/TP2/rendu/tests/fail/bad_free.c
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "../../vmap.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
Memory* mem = memory_init(-1);
|
||||||
|
int pid1 = 12;
|
||||||
|
int pid2 = 24;
|
||||||
|
|
||||||
|
char* real1 = malloc(sizeof(char)*32);
|
||||||
|
real1[0] = 'h';
|
||||||
|
real1[1] = 'e';
|
||||||
|
real1[2] = 'l';
|
||||||
|
real1[3] = 'l';
|
||||||
|
real1[4] = 'o';
|
||||||
|
real1[5] = '!';
|
||||||
|
real1[6] = '\0';
|
||||||
|
|
||||||
|
char* data1 = my_malloc(mem, 32*sizeof(char), pid1);
|
||||||
|
char* data2 = my_malloc(mem, 32*sizeof(char), pid2);
|
||||||
|
|
||||||
|
my_free(mem, data1, pid1);
|
||||||
|
my_free(mem, data2, pid1); //! bad PID
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,11 +1,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "vmap.h"
|
#include "../../vmap.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Add more tests here
|
Memory* mem = memory_init(-1);
|
||||||
VMap* vmap = vmap_init();
|
int pid = 12;
|
||||||
|
|
||||||
char* real1 = malloc(sizeof(char)*32);
|
char* real1 = malloc(sizeof(char)*32);
|
||||||
real1[0] = 'h';
|
real1[0] = 'h';
|
||||||
@ -16,18 +16,18 @@ int main() {
|
|||||||
real1[5] = '!';
|
real1[5] = '!';
|
||||||
real1[6] = '\0';
|
real1[6] = '\0';
|
||||||
|
|
||||||
char* data1 = my_malloc(vmap, 32*sizeof(char));
|
char* data1 = my_malloc(mem, 32*sizeof(char), pid);
|
||||||
char* data2 = my_malloc(vmap, 32*sizeof(char));
|
char* data2 = my_malloc(mem, 32*sizeof(char), pid);
|
||||||
|
|
||||||
vmap_copy_from_memory(vmap, real1, data1, 8);
|
vmap_copy_from_memory(mem, real1, data1, 8, pid);
|
||||||
|
|
||||||
my_copy(vmap, data1, data2, 32*sizeof(char));
|
my_copy(mem, data1, data2, 32*sizeof(char), pid);
|
||||||
|
|
||||||
char* real = malloc(sizeof(char)*32);
|
char* real = malloc(sizeof(char)*32);
|
||||||
|
|
||||||
vmap_copy_to_memory(vmap, data2, real, 7);
|
vmap_copy_to_memory(mem, data2, real, 7, pid);
|
||||||
|
|
||||||
if (strcmp(real1, real1)) {
|
if (strcmp(real, real1)) {
|
||||||
printf("%d\n", strcmp(real, real1));
|
printf("%d\n", strcmp(real, real1));
|
||||||
fprintf(stderr, "copy test failed\n");
|
fprintf(stderr, "copy test failed\n");
|
||||||
return 1;
|
return 1;
|
||||||
@ -36,8 +36,8 @@ int main() {
|
|||||||
free(real);
|
free(real);
|
||||||
free(real1);
|
free(real1);
|
||||||
|
|
||||||
my_free(vmap, data1);
|
my_free(mem, data1, pid);
|
||||||
my_free(vmap, data2);
|
my_free(mem, data2, pid);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
56
TP/TP2/rendu/tests/success/threads.c
Normal file
56
TP/TP2/rendu/tests/success/threads.c
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "../../vmap.h"
|
||||||
|
|
||||||
|
#define N 6
|
||||||
|
|
||||||
|
struct args {
|
||||||
|
Memory* mem;
|
||||||
|
int count;
|
||||||
|
int size;
|
||||||
|
int pid;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void* thread(void* void_args) {
|
||||||
|
struct args* args = (struct args*)void_args;
|
||||||
|
Memory* mem = args->mem;
|
||||||
|
int count = args->count;
|
||||||
|
int size = args->size;
|
||||||
|
int pid = args->pid;
|
||||||
|
|
||||||
|
void** ptrs = malloc(sizeof(void*)*count);
|
||||||
|
for (int i=0; i < count; i++) {
|
||||||
|
ptrs[i] = my_malloc(mem, size, pid);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i=0; i < count; i++) {
|
||||||
|
my_free(mem, ptrs[i], pid);
|
||||||
|
}
|
||||||
|
free(ptrs);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
struct args* args = malloc(sizeof(struct args));
|
||||||
|
int pid = 12;
|
||||||
|
Memory* mem = memory_init(pid);
|
||||||
|
|
||||||
|
args->mem = mem;
|
||||||
|
args->pid = pid;
|
||||||
|
args->count = 20;
|
||||||
|
args->size = 4;
|
||||||
|
|
||||||
|
pthread_t tid[N];
|
||||||
|
|
||||||
|
for (int i=0; i < N; i++) {
|
||||||
|
pthread_create(&(tid[i]), NULL, &thread, (void*)args);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i=0; i < N; i++) {
|
||||||
|
pthread_join(tid[i], NULL);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@ -7,6 +7,35 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "vmap.h"
|
#include "vmap.h"
|
||||||
|
|
||||||
|
Memory* memory_init(int pid) {
|
||||||
|
Memory* mem = (Memory*)malloc(sizeof(Memory));
|
||||||
|
mem->next = NULL;
|
||||||
|
mem->pid = pid;
|
||||||
|
mem->vmap = vmap_init();
|
||||||
|
|
||||||
|
return mem;
|
||||||
|
}
|
||||||
|
|
||||||
|
VMap* memory_get(Memory* mem, int pid) {
|
||||||
|
if (!mem)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (mem->pid == pid)
|
||||||
|
return mem->vmap;
|
||||||
|
|
||||||
|
if (mem->pid == -1) {
|
||||||
|
mem->pid = pid;
|
||||||
|
return mem->vmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(mem->next)) {
|
||||||
|
mem->next = memory_init(pid);
|
||||||
|
return mem->next->vmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
return memory_get(mem->next, pid);
|
||||||
|
}
|
||||||
|
|
||||||
VMap* vmap_init() {
|
VMap* vmap_init() {
|
||||||
VMap* vmap = (VMap*)malloc(sizeof(VMap));
|
VMap* vmap = (VMap*)malloc(sizeof(VMap));
|
||||||
vmap->mmap = mmap_init();
|
vmap->mmap = mmap_init();
|
||||||
@ -67,12 +96,14 @@ void vmap_unswap(VMap* vmap, PageMapInfo* page) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void* my_malloc(VMap* vmap, int size) {
|
void* my_malloc(Memory* mem, int size, int pid) {
|
||||||
if (size > PAGE_SIZE) {
|
if (size > PAGE_SIZE) {
|
||||||
fprintf(stderr, "my_malloc: Requesting too much space: %d > %d\n", size, PAGE_SIZE);
|
fprintf(stderr, "my_malloc: Requesting too much space: %d > %d\n", size, PAGE_SIZE);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VMap* vmap = memory_get(mem, pid);
|
||||||
|
pthread_mutex_lock(&vmap->lock);
|
||||||
// Parcours de la liste pour trouver un candidat. Sinon, nouvelle page
|
// Parcours de la liste pour trouver un candidat. Sinon, nouvelle page
|
||||||
node* current = vmap->pages->head;
|
node* current = vmap->pages->head;
|
||||||
while (current) {
|
while (current) {
|
||||||
@ -82,6 +113,7 @@ void* my_malloc(VMap* vmap, int size) {
|
|||||||
page->cursor += size;
|
page->cursor += size;
|
||||||
page->nb_allocs++;
|
page->nb_allocs++;
|
||||||
|
|
||||||
|
pthread_mutex_unlock(&vmap->lock);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
current = current->next;
|
current = current->next;
|
||||||
@ -93,14 +125,17 @@ void* my_malloc(VMap* vmap, int size) {
|
|||||||
page->cursor += size;
|
page->cursor += size;
|
||||||
page->nb_allocs++;
|
page->nb_allocs++;
|
||||||
|
|
||||||
|
pthread_mutex_unlock(&vmap->lock);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void my_free(VMap* vmap, void* ptr) {
|
void my_free(Memory* mem, void* ptr, int pid) {
|
||||||
|
VMap* vmap = memory_get(mem, pid);
|
||||||
|
pthread_mutex_lock(&vmap->lock);
|
||||||
PageMapInfo* page = vmap_get_page(vmap, ptr);
|
PageMapInfo* page = vmap_get_page(vmap, ptr);
|
||||||
|
|
||||||
if (!page) {
|
if (!page) {
|
||||||
fprintf(stderr, "my_free: Double free or memory corrupted\n");
|
fprintf(stderr, "my_free: double free or memory corrupted\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,12 +143,20 @@ void my_free(VMap* vmap, void* ptr) {
|
|||||||
if (page->nb_allocs == 0) {
|
if (page->nb_allocs == 0) {
|
||||||
vmap_free_page(vmap, page);
|
vmap_free_page(vmap, page);
|
||||||
}
|
}
|
||||||
|
pthread_mutex_unlock(&vmap->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void my_copy(VMap* vmap, void* src, void* dst, int size) {
|
void my_copy(Memory* mem, void* src, void* dst, int size, int pid) {
|
||||||
|
VMap* vmap = memory_get(mem, pid);
|
||||||
|
pthread_mutex_lock(&vmap->lock);
|
||||||
PageMapInfo* page_map_src = vmap_get_page(vmap, src);
|
PageMapInfo* page_map_src = vmap_get_page(vmap, src);
|
||||||
PageMapInfo* page_map_dst = vmap_get_page(vmap, dst);
|
PageMapInfo* page_map_dst = vmap_get_page(vmap, dst);
|
||||||
|
|
||||||
|
if (!page_map_src || !page_map_dst) {
|
||||||
|
fprintf(stderr, "my_copy: segmentation fault\n"); // Trying to access bad page
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (((int64_t)src % PAGE_SIZE) + size >= PAGE_SIZE) {
|
if (((int64_t)src % PAGE_SIZE) + size >= PAGE_SIZE) {
|
||||||
fprintf(stderr, "my_copy: size not available in this src page\n");
|
fprintf(stderr, "my_copy: size not available in this src page\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -134,10 +177,13 @@ void my_copy(VMap* vmap, void* src, void* dst, int size) {
|
|||||||
PageInfo* page_src = page_lookup(vmap->mmap, page_map_src->key);
|
PageInfo* page_src = page_lookup(vmap->mmap, page_map_src->key);
|
||||||
PageInfo* page_dst = page_lookup(vmap->mmap, page_map_dst->key);
|
PageInfo* page_dst = page_lookup(vmap->mmap, page_map_dst->key);
|
||||||
|
|
||||||
memcpy(page_dst->data+((int64_t)src % PAGE_SIZE), page_src->data+((int64_t)dst % PAGE_SIZE), size);
|
memcpy(page_src->data+((int64_t)dst % PAGE_SIZE), page_dst->data+((int64_t)src % PAGE_SIZE), size);
|
||||||
|
pthread_mutex_unlock(&vmap->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmap_copy_to_memory(struct VMap *vmap, void *src, void *dst, int size) {
|
void vmap_copy_to_memory(Memory* mem, void *src, void *dst, int size, int pid) {
|
||||||
|
VMap* vmap = memory_get(mem, pid);
|
||||||
|
pthread_mutex_lock(&vmap->lock);
|
||||||
PageMapInfo* page_map = vmap_get_page(vmap, src);
|
PageMapInfo* page_map = vmap_get_page(vmap, src);
|
||||||
PageInfo* page = page_lookup(vmap->mmap, page_map->key);
|
PageInfo* page = page_lookup(vmap->mmap, page_map->key);
|
||||||
|
|
||||||
@ -146,10 +192,13 @@ void vmap_copy_to_memory(struct VMap *vmap, void *src, void *dst, int size) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(page->data + ((int64_t)src % PAGE_SIZE), dst, size);
|
memcpy(dst, page->data + ((int64_t)src % PAGE_SIZE), size);
|
||||||
|
pthread_mutex_unlock(&vmap->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmap_copy_from_memory(struct VMap *vmap, void *src, void *dst, int size) {
|
void vmap_copy_from_memory(Memory* mem, void *src, void *dst, int size, int pid) {
|
||||||
|
VMap* vmap = memory_get(mem, pid);
|
||||||
|
pthread_mutex_lock(&vmap->lock);
|
||||||
PageMapInfo* page_map = vmap_get_page(vmap, dst);
|
PageMapInfo* page_map = vmap_get_page(vmap, dst);
|
||||||
PageInfo* page = page_lookup(vmap->mmap, page_map->key);
|
PageInfo* page = page_lookup(vmap->mmap, page_map->key);
|
||||||
|
|
||||||
@ -158,5 +207,6 @@ void vmap_copy_from_memory(struct VMap *vmap, void *src, void *dst, int size) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(src, page->data + ((int64_t)dst % PAGE_SIZE), size);
|
memcpy(page->data + ((int64_t)dst % PAGE_SIZE), src, size);
|
||||||
|
pthread_mutex_unlock(&vmap->lock);
|
||||||
}
|
}
|
@ -1,14 +1,23 @@
|
|||||||
#ifndef DEF_VMAP_H
|
#ifndef DEF_VMAP_H
|
||||||
#define DEF_VMAP_H
|
#define DEF_VMAP_H
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
#include "mmap.h"
|
#include "mmap.h"
|
||||||
|
|
||||||
typedef struct VMap {
|
typedef struct VMap {
|
||||||
MMap* mmap;
|
MMap* mmap;
|
||||||
linkedList* pages;
|
linkedList* pages;
|
||||||
int index; // index of virt memory
|
pthread_mutex_t lock;
|
||||||
|
int index; // size already alloc'ed
|
||||||
} VMap;
|
} VMap;
|
||||||
|
|
||||||
|
typedef struct Memory { // List of VMaps
|
||||||
|
struct Memory* next;
|
||||||
|
VMap* vmap;
|
||||||
|
int pid;
|
||||||
|
} Memory;
|
||||||
|
|
||||||
typedef struct PageMapInfo {
|
typedef struct PageMapInfo {
|
||||||
int start;
|
int start;
|
||||||
int key; // key for mmap
|
int key; // key for mmap
|
||||||
@ -17,6 +26,10 @@ typedef struct PageMapInfo {
|
|||||||
bool swapped;
|
bool swapped;
|
||||||
} PageMapInfo;
|
} PageMapInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If PID is (-1), a blank VMap is created and will be assigned to the 1st pid requesting it
|
||||||
|
*/
|
||||||
|
Memory* memory_init(int pid);
|
||||||
VMap* vmap_init();
|
VMap* vmap_init();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,15 +40,15 @@ PageMapInfo* vmap_get_page(VMap* vmap, void* ptr);
|
|||||||
/**
|
/**
|
||||||
* From implemented memory to real memory
|
* From implemented memory to real memory
|
||||||
*/
|
*/
|
||||||
void vmap_copy_to_memory(struct VMap *vmap, void *src, void *dst, int size);
|
void vmap_copy_to_memory(Memory* mem, void *src, void *dst, int size, int pid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* From real memory to implemented memory
|
* From real memory to implemented memory
|
||||||
*/
|
*/
|
||||||
void vmap_copy_from_memory(struct VMap *vmap, void *src, void *dst, int size);
|
void vmap_copy_from_memory(Memory* mem, void *src, void *dst, int size, int pid);
|
||||||
|
|
||||||
void* my_malloc(VMap* vmap, int size);
|
void* my_malloc(Memory* mem, int size, int pid);
|
||||||
void my_free(VMap* vmap, void* ptr);
|
void my_free(Memory* mem, void* ptr, int pid);
|
||||||
void my_copy(VMap* vmap, void* src, void* dst, int size);
|
void my_copy(Memory* mem, void* src, void* dst, int size, int pid);
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
x
Reference in New Issue
Block a user