본문 바로가기

size

linux partitions (sda, sda1, sda2...) # cat partitions major minor #blocks name 1 0 8192 ram0 8 0 247087104 sda -> 디스크.. 보통 여기에 파티션을 만들지는 않는다. 8 1 204800 sda1 -> 실제 파티션 8 2 1048576 sda2 8 3 1048576 sda3 8 4 1048576 sda4 8 5 30720 sda5 8 6 102400 sda6 8 7 20480 sda7 8 8 30720 sda8 8 9 614400 sda9 8 10 17039360 sda10 8 11 225898444 sda11 8 16 4096 sdb 8 32 4096 sdc = 아래는 byte 단위 일듯 # cat size 494174208 # cat /sys/block/sda/sda1/start .. 더보기
Calculation real size from results of 'df' and 'stat' "df" show result based on KB unit."stat" using block unit that it can be get from "stat"'s result. # df -h /efsFilesystem Size Used Avail Use% Mounted on/dev/block/mmcblk0p16 12M 712K 11M 6% /efs # df /efsFilesystem 1K-blocks Used Available Use% Mounted on/dev/block/mmcblk0p16 12016 712 11304 6% /efs 1K-blocks : total block count12016(KB)/1024 = 11.734712(KB) # stat -f /efs File: "/efs" ID: d360.. 더보기
visual studio 에서 stack size 유추 / set 하기 1 MByte = 1024 (Kbyte) * (1024) byte = 1048576 byte 256 MByte = 268435456 byteint 배열 67,108,864개 visual studio 에서 stack size 변경하기http://copynull.tistory.com/40 메뉴에서"프로젝트" -> "[프로젝트명] 속성" -> 왼쪽메뉴에서 "구성속성" -> "링커" -> 시스템 스택 예약 크기를 byte 단위로 입력 더보기
xming 관련 tip 들 Xming 글씨 크기가 작을때http://blueedu.dothome.co.kr/xe/usefulinfo/21962 Xming 윈도우 창이 크기조절이 안되고 윈도우 단축키(win + 방향키)로 동작하게 하고 싶을때- 터미널 창에서 "gnome-wm &" 입력 후 이후에 linux 프로그램 실행함.=> 이 방법으로 실행하면 다른 program(gedit, meld) 등이 정상 동작까지 시간이 오래걸리는 side-effect 가 발생함.- "C:\Program Files (x86)\Xming\Xming.exe" :0 -clipboard -multiwindow -screen 0 1920x1080@1=> 위 옵션 추가해서 해결 더보기
vmalloc 할당의 최대 크기는? 알다시피 kmalloc 의 경우 할당 메모리 크기에 제한이 있다.- kernel 2.4 이하 : 32*PAGE_SIZE(4KB) - kernel 2.4 이상 : 128*PAGE_SIZE(4KB) vmalloc 일경우는 어떨까? 기본적으로 vmalloc 도 kmalloc 을 내부적으로 사용하기 때문에 ZONE_NORMAL 영역에서 할당받는다.따라서 32 bit 의 original config 의 경우에 대략 880MB 정도가 최대 할당 크기 이다. 아래 글을 읽어보자. 원문 : http://egloos.zum.com/embedded21/v/530514 Linux에서 kernel 영역에서의 동적 memory allocation인 kmalloc과 vmalloc에 대해서 알아보도록 하자. Kernel은 phys.. 더보기
linux kernel 에서 사용 할 수 있는 file io functions 원칙적으로, linux kernel layer 에서는 file io 를 다루면 안된다. 여러 이유가 있겠지만, 일단 file descriptor list 를 각 task descriptor 에서 관리하고 있고, file을 linux kernel 단에서 접근하게 되면, 어느 process 에서 지금 kernel code 를 실행하는지 일일이 확인해야 하기 때문이다. 또한, 각 process 가 가진 access(read / write) 권한 문제도 발생하게 된다. 하지만, 이를 모두 감수하고라도, 꼭 써야만 하겠다면 다음 함수를 사용하면 된다. 여기에는 간단하게 동작하는 file operation 을 제공한다. open close size read write 더보기
chrome 의 유용한 command parameter 구글을 cmd 로 실행할때 유용한 파라미터 들이다. ex>chrome.exe --app=http://endic.naver.com/popManager.nhn?sLn=kr&m=miniPopMain --app-window-size=1400,760 chrome.exe www.haver.com "--app=" : 팝업창으로 띄워준다"--new-window" : 새윈도우로 띄워준다. (보통은 기존창에 새탑으로 뜬다)"--app-window-size=1400,760" : 창을 띄울때 사이즈를 지정해 준다. 더보기
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.. 더보기
linux - Heap 은 움직인다(늘어난다). cat /proc/[pid]/maps 를 하면 해당 process 가 메모리를 어떻게 사용하고 있는지 알 수 있습니다. Test 를 할 일이 있어서 malloc 을 계속해서 할당하는 application 을 구현해서 heap size 를 보았습니다. # cat maps 00008000-00009000 r-xp 00000000 8a:09 42521 /opt/make_lock_up 00010000-00011000 rwxp 00000000 8a:09 42521 /opt/make_lock_up 00011000-0a8ad000 rwxp 00011000 00:00 0 [heap] 40000000-4001c000 r-xp 00000000 8b:07 2304052 /lib/ld-2.5.so 4001c000-4001f0.. 더보기