词条 | setblock |
释义 | 函数名: setblock 功 能: 修改先前已分配的DOS存储段大小 用 法: int setblock(int seg, int newsize); 程序例: #include <dos.h> #include <alloc.h> #include <stdio.h> #include <stdlib.h> int main(void) { unsigned int size, segp; int stat; size = 64; /* (64 x 16) = 1024 bytes */ stat = allocmem(size, &segp); if (stat == -1) printf("Allocated memory at segment: %X\", segp); else { printf("Failed: maximum number of paragraphs available is %d\", stat); exit(1); } stat = setblock(segp, size * 2); if (stat == -1) printf("Expanded memory block at segment: %X\", segp); else printf("Failed: maximum number of paragraphs available is %d\", stat); freemem(segp); return 0; } |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。