| Server IP : 103.18.247.38 / Your IP : 216.73.217.101 Web Server : Apache System : Linux server2.aznethosting.net 4.18.0-553.144.1.el8_10.x86_64 #1 SMP Tue Jul 14 09:26:58 EDT 2026 x86_64 User : gmbizz ( 1200) PHP Version : 8.1.34 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/src/file_protector-1.1-1565/ |
Upload File : |
/**
@file
@brief Linux kernel memory management interface wrapper
@details Copyright (c) 2017-2018 Acronis International GmbH
@author Mikhail Krivtsov (mikhail.krivtsov@acronis.com)
@since $Id: $
*/
#pragma once
#include <linux/mm.h> // is_vmalloc_addr()
#include <linux/slab.h> // kmalloc(), kzalloc(), kfree()
#include <linux/vmalloc.h> // vmalloc(), vfree()
#define mem_alloc_with_alloc_flags(size, nowait) kmalloc(size, (nowait) ? (GFP_ATOMIC) : (GFP_KERNEL))
#define mem_alloc0_with_alloc_flags(size, nowait) kzalloc(size, (nowait) ? (GFP_ATOMIC) : (GFP_KERNEL))
#define mem_alloc(size) mem_alloc_with_alloc_flags(size, false)
#define mem_alloc0(size) mem_alloc0_with_alloc_flags(size, false)
#define mem_alloc_nowait(size) mem_alloc_with_alloc_flags(size, true)
#define mem_alloc0_nowait(size) mem_alloc0_with_alloc_flags(size, true)
#define mem_free(p) kfree(p)
static inline void *kvmalloc_compat(size_t size, gfp_t flags)
{
void *ret;
ret = kmalloc(size, flags | __GFP_NOWARN);
if (ret)
{
return ret;
}
return vmalloc(size);
}
static inline void kvfree_compat(void *addr)
{
if (is_vmalloc_addr(addr))
vfree(addr);
else
kfree(addr);
}
#define large_mem_alloc(size) kvmalloc_compat(size, GFP_KERNEL)
#define large_mem_free(p) kvfree_compat(p)
#define vmem_alloc(size) vmalloc(size)
#define vmem_free(p) vfree(p)