본문 바로가기

section

__meminit section keyword 아래와 같이 _meminit section keyword 가 붙은 함수들을 볼 수 있다. 이러한 함수들은 linux kernel booting 초반에만 code영역에 위치하고, 이후 code영역이 overwrite된다. 즉, booting 초기에만 사용될 함수라고 보면 된다. extern int __meminit early_pfn_to_nid(unsigned long pfn); /* there is a per-arch backend function. */ extern int __meminit __early_pfn_to_nid(unsigned long pfn, struct mminit_pfnnid_cache *state); 부팅이 일정이상 진행되면 호출할 수 없다. 더보기
사용가용한 physical memory block 을 얻어오는 방법 /sys/devices/system/memory/ 의 메모리들 /sys/devices/system/memory# ls block_size_bytes memory14 memory32 memory4 memory47 memory54 memory61 memory8 hard_offline_page memory15 memory33 memory40 memory48 memory55 memory62 memory9 memory0 memory16 memory34 memory41 memory49 memory56 memory63 probe memory1 memory17 memory35 memory42 memory5 memory57 memory64 soft_offline_page memory10 memory18 memory36 .. 더보기
linux virtual memory - Zone, Node, Section 의 개념 정의 : kernel 이 비슷한 속성을 가지는 page 를 관리하는 각 영역 사용 이유 1. 특정 메모리 주소에만 DMA 를 사용할 수 있는 HW 가 있다. 2. 가상 주소보다 더 많은 물리 주소를 사용할 수 있는 아키텍처가 있다. 종류 : ZONE_DMA, ZONE_NORMAL, ZONE_HIGHMEM In Linux, the memory available from all banks is classified into "nodes". These nodes indicate how much memory each bank has. This classification is mainly useful for NUMA architectures, but it's also used for.. 더보기
readelf - 섹션 위치 한눈에 보기 readelf 에는 다음과 같은 기능이 있습니다. elf의 각 섹션들을 나열해 주고 크기와 속성을 보여줍니다. > readelf -l core.1455 Elf file type is CORE (Core file) Entry point 0x0 There are 79 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align NOTE 0x000a14 0x00000000 0x00000000 0x001dc 0x00000 0 LOAD 0x001000 0x2a000000 0x00000000 0x4d000 0x4d000 R E 0x1000 LOAD 0x04e000 0x2a0550.. 더보기