Dynamic Memory Package›Written for CC8, Ace C's linker &›libraries›by Mark Miller›---------------------------------››Files:››ALMLIB.C›ALMLIB.CCC›STDIO.H›STACK.C›STACK.COM››ALMLIB.C contains:›malloc(), free(), almreset(), &›almdump(). You should not need to›use update(). It is only intended›for use by malloc().››These routines use the Page 6 area›for dynamic memory allocation.›almreset() - Sets the Page 6 area›to zeroes.›almdump() - Is intended for›debugging purposes. It dumps the›Page 6 area, a byte at a time in›decimal form, to the screen.››malloc() and free() act as close›to their standard behavior as I›could get them. Each block that is›allocated with malloc() will be›preceded by two bytes, the›availability byte, and the size›byte. This is the way malloc()›determines how much free space is›available, and keeps it from›stepping on stuff already›allocated. malloc() allocates›memory in bytes.››ALMLIB.CCC - ALMLIB.C compiled›into P-code using CC8. CC8›compiled code can be linked using›the Ace C, Deep Blue C, or›Lightspeed C linkers, to other›P-code files created with the›corresponding compilers, including›other P-code files created by CC8.››STDIO.H - Contains the definition›of NULL (i.e. #define NULL 0). It›is not really needed, unless you›intend to recompile ALMLIB.C, or›you can use it for convenience in›your own programs.››STACK.C - Is an example program I›wrote for a data structures course›in college. It implements a stack›as a linked-list structure. It›takes as input, sentences›containing words separated by›spaces, and terminated by a period,›question-mark, exclamation point,›etc. I don't think it really›matters. The program uses two›stacks to reverse the order of the›words in the sentence, without›reversing the lettering in the›words. It puts whatever you›terminated the sentence with at›the end of the reversed sentence.››STACK.COM - The compiled and›linked version of STACK.C. It is›ready to run.››ENGINE.OBJ - The runtime engine›from Ace C. It must be in the›same directory as STACK.COM, since›it is loaded at runtime.››If you have any questions about›this package, you can e-mail to me›at millerm@cs.colostate.edu›