Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

Example applications


Detailed Description

The uIP distribution contains a number of example applications that can be either used directory or studied when learning to develop applications for uIP.

uIP의 특징은 uIP를 위한 어플리케이션을 개발하기 위해 학습을 할 때 도움이 될 수 있는 하나의 예제 어플리케이션이 있다.



Files

file  memb.c
 Memory block allocation routines.
메모리 블록 할당 루틴.

file  memb.h
 Memory block allocation routines.
메모리 블록 할당 루틴.


Modules

Web client
SMTP E-mail sender
Telnet server
Web server

Defines

#define MEMB(name, size, num)
 Declare a memory block.
메모리 블록 선언.


Functions

void memb_init (struct memb_blocks *m)
 Initialize a memory block that was declared with MEMB().
MEMB()로 선언된 메모리 블록 초기화.

char * memb_alloc (struct memb_blocks *m)
 Allocate a memory block from a block of memory declared with MEMB().
MEMB()로 선언된 메모리 블록으로부터 메모리 블록 할당.

char memb_ref (struct memb_blocks *m, char *ptr)
 Increase the reference count for a memory chunk.
메모리를 위한 참조 카운터를 증가.

char memb_free (struct memb_blocks *m, char *ptr)
 Deallocate a memory block from a memory block previously declared with MEMB().
MEMB()로 이전에 선언된 메모리 블록으로부터 메모리 블록을 해제.


Define Documentation

#define MEMB (  name,
size,
num   ) 
 

Value:

static char memb_mem[(size + 1) * num]; \
        static struct memb_blocks name = {size, num, memb_mem}
Declare a memory block.

메모리 블록 선언


Parameters:
name The name of the memory block (later used with memb_init(), memb_alloc() and memb_free()).

메모리 블록의 이름(나중에 memb_init(), memb_alloc(), memb_free()에서 사용됨)

size The size of each memory chunk, in bytes.

바이트 단위의 각 메모리 사이즈.

num The total number of memory chunks in the block.

블록에 있는 메모리의 총 수.


Function Documentation

char* memb_alloc (  struct memb_blocks *  m  ) 
 

Allocate a memory block from a block of memory declared with MEMB().

MEMB()로 선언된 메모리 블록으로부터 메모리 블록 할당


Parameters:
m A memory block previosly declared with MEMB().

MEMB()로 이전에 할당된 메모리 블록.

char memb_free (  struct memb_blocks *  m,
char *  ptr
) 
 

Deallocate a memory block from a memory block previously declared with MEMB().

MEMB()로 이전에 선언된 메모리 블록으로부터 메모리 블록을 해제.


Parameters:
m m A memory block previosly declared with MEMB().

MEMB()로 이전에 할당된 메모리 블록.

ptr A pointer to the memory block that is to be deallocated.

할당 해제되어질 메모리 블록의 포인터.
Returns:
The new reference count for the memory block (should be 0 if successfully deallocated) or -1 if the pointer "ptr" did not point to a legal memory block.

메모리 블록을 위한 새로운 참조 카운터, 만약 포인터 "ptr"이 올바른 메모리 블록을 가리키고 있지않다면 1

void memb_init (  struct memb_blocks *  m  ) 
 

Initialize a memory block that was declared with MEMB().

MEMB()로 선언된 메모리 블록 초기화.


Parameters:
m A memory block previosly declared with MEMB().

MEMB()로 이전에 할당된 메모리 블록.

char memb_ref (  struct memb_blocks *  m,
char *  ptr
) 
 

Increase the reference count for a memory chunk.

메모리로를 위한 참조 카운터를 증가.


Note:
No sanity checks are currently made.

오류검사는 현재 이루어지지 않는다.
Parameters:
m m A memory block previosly declared with MEMB().

MEMB()로 이전에 할당된 메모리 블록.

ptr A pointer to the memory chunk for which the reference count should be increased.

참조 카운터가 증가 되어야 하는 메모리를 가리키는 포인터.
Returns:
The new reference count.

새로운 참조 카운터.


Generated on Tue Oct 7 15:51:43 2003 for uIP 0.9 by doxygen 1.3.3