Made the VM even calmer - this one uses the TRACE() stuff now as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4347 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
** Distributed under the terms of the NewOS License.
|
** Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <vm.h>
|
#include <vm.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
@@ -12,12 +13,21 @@
|
|||||||
#include <kerrors.h>
|
#include <kerrors.h>
|
||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
|
|
||||||
static void anonymous_destroy(struct vm_store *store)
|
#ifndef TRACE_VM
|
||||||
|
# define TRACE_VM 0
|
||||||
|
#endif
|
||||||
|
#if TRACE_VM
|
||||||
|
# define TRACE(x) dprintf(x)
|
||||||
|
#else
|
||||||
|
# define TRACE(x) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
anonymous_destroy(struct vm_store *store)
|
||||||
{
|
{
|
||||||
if(store) {
|
|
||||||
free(store);
|
free(store);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* anonymous_commit
|
/* anonymous_commit
|
||||||
* As this store provides anonymous memory that is simply discarded
|
* As this store provides anonymous memory that is simply discarded
|
||||||
@@ -67,7 +77,8 @@ static vm_store_ops anonymous_ops = {
|
|||||||
/* vm_store_create_anonymous
|
/* vm_store_create_anonymous
|
||||||
* Create a new vm_store that uses anonymous noswap memory
|
* Create a new vm_store that uses anonymous noswap memory
|
||||||
*/
|
*/
|
||||||
vm_store *vm_store_create_anonymous_noswap()
|
vm_store *
|
||||||
|
vm_store_create_anonymous_noswap()
|
||||||
{
|
{
|
||||||
vm_store *store;
|
vm_store *store;
|
||||||
|
|
||||||
@@ -75,7 +86,7 @@ vm_store *vm_store_create_anonymous_noswap()
|
|||||||
if (store == NULL)
|
if (store == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dprintf("vm_store_create_anonymous (%p)\n", store);
|
TRACE(("vm_store_create_anonymous (%p)\n", store));
|
||||||
|
|
||||||
store->ops = &anonymous_ops;
|
store->ops = &anonymous_ops;
|
||||||
store->cache = NULL;
|
store->cache = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user