General Info

Interface: MemMan
Files: memman.h
Last Change: 24/07/2002
Author: Luiz Henrique Shigunov
Description
System Functions

0x00 - Compare - Compare two memory areas
0x01 - Copy - Copy a memory area
0x02 - FindByte - Find a byte in a memory area

0x03 - Move - Move a memory area
0x04 - Set - Fill a memory area

Description

This page describes the MemMan interface which provides many functions to manipulate memory areas.

0x00 - Compare

Syntax

int MemMan_Compare(const void *m1, const void *m2, unsigned int count);

Properties

Description

This function compares count bytes from m1 with m2.

Return value

< 0 - if m1 is less than m2;
= 0 - if m1 is equal to m2;
> 0 - if m1 is greater than m2.

0x01 - Copy

Syntax

void MemMan_Copy(void *dest, const void *src, unsigned int count);

Properties

Description

This function copies count bytes from src to dest.

The areas CANNOT overlay and dest must be big enough.

Return value

Nothing.

0x02 - FindByte

Syntax

void *MemMan_FindByte(const void *mem, int c, unsigned int count);

Properties

Description

This function finds the first occurrence of byte c in mem, no more than count bytes will be searched.

Return value

A pointer to the matched byte;
NULL if it's not found.

0x03 - Move

Syntax

void MemMan_Move(void *dest, const void *src, unsigned int count);

Properties

Description

This function copies count bytes from src to dest.

The memory areas CAN overlay and dest must be big enough.

Return value

Nothing.

0x04 - Set

Syntax

void MemMan_Set(void *mem, unsigned int c, unsigned int count);

Properties

Description

This function fills count bytes of mem with byte c.

Return value

Nothing.