>> Edit article
이름
메일
제목
패스워드
전 메모리 남은거 모조리 할당하는거 였음둥.. 히히.. 실제 메모리랑 스왑까지 해서 1.3기가 정도는 가볍게 할당하는 군요... 아래 소스 #include #include #include #define A_MEGABYTE (1024 * 1024) int main() { char *some_memory; size_t size_to_allocate = A_MEGABYTE; int mesg_obtained = 0; while (mesg_obtained < 16512) { some_memory = (char *)malloc(size_to_allocate); if (some_memory != NULL) { memset(some_memory,0x00,A_MEGABYTE); mesg_obtained++; sprintf(some_memory, "hello world"); printf("%s - now allocate %d MegaBytes\n", some_memory, mesg_obtaine d); } else { exit(EXIT_FAILURE); } } exit(EXIT_SUCCESS); } : 오늘 너무 심심해서(?) 테스트를 해봤다. : : 현재 reiserfs 파일 시스템을 사용하고있는데 : : 기존의 ext2fs는 한 파일의 최대길이가 2GB였다. : : 그러면 reiserfs는 얼마나 가능할까.. : : 현재 하드에 남은 용량이 7GB였는데...아무 문제없이 : : 생성이 되었다(놀라워라...). : : 그렀다면 MySQL에 아무 많은(?) 데이터를 저장해도 되겠구나 (생각한다). : : 내일은 MySQL에 데이터를 집어넣는 테스트나 해볼까...!@#$@#$
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved