⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memtrack.h

📁 开源的防火墙代码
💻 H
字号:
/* Copyright (c) 2002-2005 Vladislav Goncharov.
*
* Redistribution and use in source forms, with and without modification,
* are permitted provided that this entire comment appears intact.
*
* Redistribution in binary form may occur without any restrictions.
*
* This software is provided ``AS IS'' without any warranties of any kind.
*/

// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil -*- (for GNU Emacs)
//
// $Id: memtrack.h,v 1.1.1.1 2002/09/24 11:12:16 dev Exp $

#ifndef _memtrack_h_
#define _memtrack_h_

#define MEM_TAG		'1VRD'

#if DBG

void	memtrack_init(void);
void	memtrack_free(void);

void	*mt_malloc(ULONG size, const char *file, ULONG line);

// allocate memory from nonpaged pool
#define malloc_np(size)	mt_malloc((size), __FILE__, __LINE__)

void free(void *ptr);

// debug macro
#define _TEST_ME_	__asm int 3

#else /* DBG */

#define memtrack_init()
#define memtrack_free()

#define malloc_np(size)	ExAllocatePoolWithTag(NonPagedPool, (size), MEM_TAG)
#define free(ptr)		ExFreePool(ptr)


#define _TEST_ME_

#endif /* DBG */

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -