|
| void | _Exit (int ret) |
| |
| long | a64l (const char *val) |
| |
| void | abort (void) |
| |
| int | abs (int val) |
| |
| int | atexit (void(*func)(void)) |
| |
| double | atof (const char *str) |
| |
| int | atoi (const char *nptr) |
| |
| long | atol (const char *nptr) |
| |
| long long | atoll (const char *nptr) |
| |
| long long | atoq (const char *nptr) |
| |
| void * | bsearch (const void *key, const void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)) |
| |
| void * | calloc (size_t nmemb, size_t size) |
| |
| double | drand48 (void) |
| |
| double | erand48 (unsigned short xsubi[3]) |
| |
| void | exit (int ret) |
| |
| void | free (void *buf) |
| |
| char * | getenv (const char *name) |
| |
| int | getsubopt (char **optionp, char *const *tokens, char **valuep) |
| |
| int | grantpt (int fd) |
| |
| char * | initstate (unsigned seed, char *state, size_t n) |
| |
| long | jrand48 (unsigned short xsubi[3]) |
| |
| char * | l64a (long value) |
| |
| long | labs (long int j) |
| |
| void | lcong48 (unsigned short param[7]) |
| |
| long long | llabs (long long) |
| |
| long | lrand48 (void) |
| |
| void * | malloc (size_t size) |
| |
| int | posix_memalign (void **memptr, size_t alignment, size_t size) |
| |
| int | setenv (const char *name, const char *value, int overwrite) |
| |
| long int | strtol (const char *nptr, char **endptr, int base) |
| |
| long long int | strtoll (const char *nptr, char **endptr, int base) |
| |
| unsigned long int | strtoul (const char *nptr, char **endptr, int base) |
| |
| unsigned long long int | strtoull (const char *nptr, char **endptr, int base) |
| |
- Note
- 병합되었으면, 다음 entry 와의 병합을 한번 더 시도한다.
-
이 경우, 병합된 것이 없으므로, 리스트에 추가하고 병합을 종료한다.
-
병합되었으면, 다음 entry 와의 병합을 한번 더 시도한다.
Definition at line 217 of file malloc.c.
References _SC_PAGESIZE, ALIGNED, CAN_BE_MERGED, container_of, chunk::head, irq_local_restore(), irq_local_save(), list_entry, list_for_each_safe, NEED_LOCK_TEST_BEGIN, NEED_LOCK_TEST_END, list_head::next, NULL, list_head::prev, chunk::size, and sysconf().
Referenced by cpu_node_destroy(), create_fat_cache(), create_zone(), destroy_fat_cache(), destroy_zone(), fat_load(), fdc_close(), fdc_open(), keyboard_close(), load_rootfs(), page_frame_alloc(), page_frame_fini(), page_frame_free(), page_frame_init(), pthread_attr_destroy(), pthread_cancel(), pthread_create(), pthread_init(), register_irq(), sem_clear(), sem_destroy(), sem_post(), serial_close(), serial_open(), ston_destroy(), ston_fini(), unregister_irq(), vfs_del_ninfo(), vfs_new_dev_ninfo(), vfs_new_ninfo(), and video_close().
- Note
- 리스트의 수정을 최소화 하기 위해서 남는공간의 뒤에서 할당을 하고, free 리스트에서 분리해내 used 리스트로 추가한다. 이렇게 하면, free 리스트를 수정하지 않아도 된다.
new_item 은 할당된 영역이 되고 item 은 남는 영역이 된다.
Definition at line 79 of file malloc.c.
References _SC_PAGESIZE, ALIGNED, irq_local_restore(), irq_local_save(), list_entry, list_for_each_safe, NEED_LOCK_TEST_BEGIN, NEED_LOCK_TEST_END, NULL, sbrk(), chunk::size, and sysconf().
Referenced by calloc(), cpu_node_create(), create_fat_cache(), create_zone(), fat_load(), fdc_open(), keyboard_open(), load_rootfs(), onetime_map_init(), page_frame_alloc(), page_frame_init(), page_frame_manage(), pthread_attr_init(), pthread_create(), pthread_init(), register_irq(), sem_init(), sem_wait(), serial_open(), ston_create(), ston_init(), strdup(), strndup(), vfs_del_ninfo(), vfs_new_dev_ninfo(), vfs_new_ninfo(), and video_open().