Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
tests
include
rw_alloc.h
Go to the documentation of this file.
1
27
#ifndef RW_ALLOC_H_INCLUDED
28
#define RW_ALLOC_H_INCLUDED
29
30
31
#include <
rw_testdefs.h
>
// for test config macros
32
33
enum
{
34
RW_PROT_NONE
= 0,
35
RW_PROT_READ
= 1 << 0,
36
RW_PROT_WRITE
= 1 << 1,
37
RW_PROT_RDWR
=
RW_PROT_READ
|
RW_PROT_WRITE
,
38
RW_PROT_BELOW
= 1 << 3
39
};
40
41
// if flags == -1 memory will be allocated by malloc();
42
// if flags != -1 memory will be allocated by system call and
43
// additional guard page with PAGE_NOACCESS protection will be allocated
44
// if RW_PROT_BELOW & flags != 0 then guard page will be located right
45
// before the user data, otherwise - right after the user data
46
// if RWSTD_ALLOC_FLAGS environment variable is defined and != 0
47
// and flags == -1, then rw_alloc will use value of RWSTD_ALLOC_FLAGS
48
// instead of flags variable
49
_TEST_EXPORT
void
*
50
rw_alloc
(_RWSTD_SIZE_T,
int
/*flags*/
= -1);
51
52
// free the memory block, allocated by rw_alloc()
53
_TEST_EXPORT
void
54
rw_free
(
void
*);
55
56
#endif
// RW_ALLOC_H_INCLUDED
RW_PROT_READ
@ RW_PROT_READ
Definition
rw_alloc.h:35
RW_PROT_NONE
@ RW_PROT_NONE
Definition
rw_alloc.h:34
RW_PROT_WRITE
@ RW_PROT_WRITE
Definition
rw_alloc.h:36
RW_PROT_RDWR
@ RW_PROT_RDWR
Definition
rw_alloc.h:37
RW_PROT_BELOW
@ RW_PROT_BELOW
Definition
rw_alloc.h:38
rw_free
_TEST_EXPORT void rw_free(void *)
Definition
alloc.cpp:621
rw_alloc
_TEST_EXPORT void * rw_alloc(_RWSTD_SIZE_T, int=-1)
rw_testdefs.h
_TEST_EXPORT
#define _TEST_EXPORT
Definition
rw_testdefs.h:55
Generated by
1.9.8