ReactOS 0.4.16-dev-336-gb667d82
mem.c File Reference
#include <rtl.h>
#include <debug.h>
Include dependency graph for mem.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

SIZE_T NTAPI RtlCompareMemory (IN const VOID *Source1, IN const VOID *Source2, IN SIZE_T Length)
 
SIZE_T NTAPI RtlCompareMemoryUlong (IN PVOID Source, IN SIZE_T Length, IN ULONG Value)
 
VOID NTAPI RtlFillMemory (PVOID Destination, SIZE_T Length, UCHAR Fill)
 
VOID NTAPI RtlFillMemoryUlong (PVOID Destination, SIZE_T Length, ULONG Fill)
 
VOID NTAPI RtlMoveMemory (PVOID Destination, CONST VOID *Source, SIZE_T Length)
 
VOID NTAPI RtlZeroMemory (PVOID Destination, SIZE_T Length)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file mem.c.

Function Documentation

◆ RtlCompareMemory()

SIZE_T NTAPI RtlCompareMemory ( IN const VOID Source1,
IN const VOID Source2,
IN SIZE_T  Length 
)

Definition at line 37 of file mem.c.

40{
41 SIZE_T i;
42 for (i = 0; (i < Length) && (((PUCHAR)Source1)[i] == ((PUCHAR)Source2)[i]); i++)
43 ;
44
45 return i;
46}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
ULONG_PTR SIZE_T
Definition: typedefs.h:80
unsigned char * PUCHAR
Definition: typedefs.h:53

◆ RtlCompareMemoryUlong()

SIZE_T NTAPI RtlCompareMemoryUlong ( IN PVOID  Source,
IN SIZE_T  Length,
IN ULONG  Value 
)

Definition at line 61 of file mem.c.

64{
66 ULONG_PTR len = Length / sizeof(ULONG);
68
69 for (i = 0; i < len; i++)
70 {
71 if (*ptr != Value)
72 break;
73
74 ptr++;
75 }
76
77 return (SIZE_T)((PCHAR)ptr - (PCHAR)Source);
78}
GLenum GLsizei len
Definition: glext.h:6722
#define PCHAR
Definition: match.c:90
static PVOID ptr
Definition: dispmode.c:27
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

◆ RtlFillMemory()

VOID NTAPI RtlFillMemory ( PVOID  Destination,
SIZE_T  Length,
UCHAR  Fill 
)

Definition at line 87 of file mem.c.

90{
92}
void Fill(HDC hdc, LONG x, LONG y, COLORREF color)
Definition: drawing.cpp:107
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3016
#define memset(x, y, z)
Definition: compat.h:39

◆ RtlFillMemoryUlong()

VOID NTAPI RtlFillMemoryUlong ( PVOID  Destination,
SIZE_T  Length,
ULONG  Fill 
)

Definition at line 101 of file mem.c.

104{
105 PULONG Dest = Destination;
106 SIZE_T Count = Length / sizeof(ULONG);
107
108 while (Count > 0)
109 {
110 *Dest = Fill;
111 Dest++;
112 Count--;
113 }
114}
int Count
Definition: noreturn.cpp:7

◆ RtlMoveMemory()

VOID NTAPI RtlMoveMemory ( PVOID  Destination,
CONST VOID Source,
SIZE_T  Length 
)

Definition at line 143 of file mem.c.

146{
148}
#define memmove(s1, s2, n)
Definition: mkisofs.h:881

◆ RtlZeroMemory()

VOID NTAPI RtlZeroMemory ( PVOID  Destination,
SIZE_T  Length 
)

Definition at line 156 of file mem.c.

158{
160}
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:599