[Anet-checkins] CVS: ANet/ANet_Daemon/Linux Makefile,1.1,1.2 main.c,1.1,1.2
Status: Abandoned
Brought to you by:
benad
From: Benoit N. <be...@us...> - 2001-11-11 17:50:26
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux In directory usw-pr-cvs1:/tmp/cvs-serv30333/Linux Modified Files: Makefile main.c Log Message: Added Memory Management (MM) Stubs Index: Makefile =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 2001/11/05 23:27:03 1.1 --- Makefile 2001/11/11 17:50:22 1.2 *************** *** 5,9 **** # Change compiler options here ! compiler = gcc -g ${header_paths} # Add source and header files paths here --- 5,9 ---- # Change compiler options here ! compiler = gcc -g ${header_paths} -Wall # Add source and header files paths here *************** *** 22,26 **** # Linking target ! anetd: DoubleLinkedLists.o LinkedLists.o BinaryTrees.o main.o ${compiler} $^ -lm -o anetd --- 22,26 ---- # Linking target ! anetd: DoubleLinkedLists.o LinkedLists.o BinaryTrees.o Memory.o main.o ${compiler} $^ -lm -o anetd *************** *** 30,33 **** --- 30,34 ---- LinkedLists.o: LinkedLists.c LinkedLists.h BinaryTrees.o: BinaryTrees.c LinkedLists.h + Memory.o: Memory.c ANetCommon.h main.o: main.c Modules.h Index: main.c =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/main.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.c 2001/11/05 23:27:03 1.1 --- main.c 2001/11/11 17:50:22 1.2 *************** *** 3,11 **** --- 3,27 ---- #include "Modules.h" + void MemoryTest(); + int main(int argc, char **argv) { printf("Starting ANet daemon...\n"); + MemoryTest(); //Do some stuff here... printf("Closing ANet daemon...\n"); return 0; + } + + void MemoryTest() + { + char *buffer = (char*)(0); + ANetMemoryTag tag; + + tag = NewMemoryBlock(20, 0); + printf("Size = %d\n", (int)(GetMemoryBlockSize(tag))); + ResolveMemoryTag(tag, (UInt8**)(&buffer)); + buffer[0] = 15; + printf("Size = %d\n", (int)(GetMemoryBlockSize(tag))); + DeleteMemoryBlock(tag); } |