|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright 2012 Institute of Communication and Computer Systems (ICCS)
|
|
|
+ * Copyright Institute of Communication and Computer Systems (ICCS)
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -26,13 +26,7 @@
|
|
|
#include "release_memory.h"
|
|
|
|
|
|
#include <sys/mman.h>
|
|
|
-#include "dmmlib/raw_block.h"
|
|
|
|
|
|
-void release_memory(void *address) {
|
|
|
- raw_block_header_t *rb_header;
|
|
|
-
|
|
|
- rb_header = (raw_block_header_t *)((char *)address -
|
|
|
- sizeof(raw_block_header_t));
|
|
|
-
|
|
|
- munmap((void *)rb_header, rb_header->size);
|
|
|
+void release_memory(raw_block_header_t *raw_block) {
|
|
|
+ munmap((void *)raw_block, raw_block->size);
|
|
|
}
|