Dos.h, alloc.h, malloc.h, stdlib.h, process.h

xiaoxiao2021-03-06  64

Storage distribution subroutine, the function library is dos.h, alloc.h, malloc.h, stdlib.h, process.hint allocmem (unsigned size, unsigned * seg) using DOS assignment of idle memory, size is allocated memory size , SEG is allocated memory pointer int freemem (unsigned seg) release the memory allocated by allocmem, SEG is the specified memory pointer int setblock (int seg, int newsize) This function is used to modify the assigned memory length, SEG is The memory pointer of the memory has been allocated, newsize is a new length

INT brk (void * endds) This function is used to change the number of spaces assigned to the calling program, and the new space end address is endDSCHAR * SBRK (INT INCR) This function is used to increase the space assigned to the calling program. Quantity, increasing the space of the INCR byte

Unsigned long coreleft () This function returns the length of the unused storage area, assigns the NELEM length of ELSIZE in bytes in bytes and returns the pointer Void * malloc to the allocated memory. (unsigned size) allocated the memory space of the Size, and returns the pointer Void free (void * ptr) allocated in the allocated memory release the memory allocated, the memory to be released is Ptrvoid * Realloc (Void * PTR, unsigned Newsize) Change the size of the allocated memory, PTR is a pointer that has been assigned with memory area, and NewSIze is a new length, returns a hidden memory pointer.

LONG FARCOREFT () This function returns the length of the unused storage area in the distortion, with bytes VOID FAR * FARCALLOC (UNSIGNED Long Units, Unsigned Long Units) Saves Units Units Units from the far, and Returns the pointer void * farmalloc (unsigned long size) assigned the SIZE byte, and returns the allocated memory pointer Void Farfree (Void Far * Block) Release the memory space that is previously assigned from the far, what to release The pointer of the long stack of memory changes the size of the allocated far-memory, the block is the pointer assigned by the memory area, and the newzie is a new length, and Newzie is a new length. Memory pointer

The time date function, the function library is Time.h, DOS.H In the time date function, the mainly used structure has the following: Total time date Storage structure TM ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ───────── ─ ┐│StructTM ││ {││ INTTM_SEC; / * Second, 0-59 * / ││ INTTM_MIN; / * Score, 0-59 * / ││ IntTM_HOUR; / * When 0-23 * / │ │ int TM_MDAY; / * Number, 1-31 * / │ │ INTTM_MON; / * Month, 0-11 * / │ │ │;; / * Since 1900's number * / ││ int TM_WDAY; / * Since Sunday 0-6 * / ││ INTTM_YDAY; / * Since January 1st, 0-365 * / ││ IntTm_isdst; / * Do you have a summer time system, The positive number * / ││} │ └─────────────────────────────────────────────────────────────────────────────── ─ ─ ─ ┐│Struct Date ││ {│ │ Int Da_Year; / * Since 1900 Number * / │ Char Da_DAY; / * Number * / ││CHAR Da_MON; / * Month 1 = Jan * / ││││ } └───────────────────────────────────────────── ─ ┐│truct time ││ {││ unsigned CHAR TI_MIN; / * Minute * / ││ UNSIGNED Char Ti_HOUR; / * Hours * / ││ unsigned char Ti_hund; ││ UNSIGNED CHAR TI_SEC

转载请注明原文地址:https://www.9cbs.com/read-85387.html

New Post(0)