Dev Language
-
javaDev Language/JAVA 2010. 12. 21. 17:10
java HotSpot VM - use a two machine-word obnject header(cf: 3 word in the classic VM) - to reduce space consumption (the average java object size is small) -> 보통 8% heap size 줄임 - first header : identity hash code and GC status information - second header : a reference to the object's class GC - fully accurate collector http://download.oracle.com/javase/1.3/docs/guide/performance/hotspot.html ja..
-
정규표현식Dev Language 2010. 12. 20. 14:02
.NET - System.Text.RegularExpressions java - java.util.regex regularExpression Tool - RegexBuddy, - online site . http://regexpal.com, . http://regex.larsolavtorvik.com . http://www.rubular.com . www.myregexp.com //java applet . reAnimator(http://osteele.com/tools/reanimator) - desktop app . expresso // .net framework 2.0 ~. 60days free . Reulator http://sourceforge.net/projects/regulator 흔히 사용되..
-
do {..} while(0)Dev Language/C 2010. 2. 22. 17:18
do.. while(0) http://mkseo.pe.kr/blog/?p=28 http://kldp.org/node/41390 http://mkseo.pe.kr/blog/?p=806 그렇다면, 다음은? 이해가 안간다. ㅠㅠ /arch/x86/inclue/asm/pgtable.h ... #define pte_update(mm, addr, ptep) do { } while(0) ... mm, addr, ptep 인자에 대한 어떤 프로세싱도 없이.. { 공백 }... 만 있다. 사용하는 예제(?)를 찾아보니, 다음과 같다 /arch/x86/mm/pgtable.c ... int ptep_test_and_clear_young(struct vm_area struct *vma, unsigned long addr, p..
-
memcpy()를 이용한 메모리 복사 예제Dev Language/C 2008. 11. 6. 14:59
#include #include int main(){ char c = 'a'; int n=100; double d = 8000.123; char *str="asdfasdf"; chat temp[100]; char *p=templ memcpy(p, &c, sizeof(char)); memcpy(p+=sizeof(char), &n, sizeof(int)); memcpy(p+=sizeof(int), &d, sizeof(double)); memcpy(p+=sizeof(double), &str, sizeof(charr*)); printf(%s\n", *(char**)p ); p-= sizeof(double); printf("%s/31f\n", *(double*)p); p-=sizeof(int); ... retur..
-
가변인자 (va_list, ...)Dev Language/C 2008. 10. 27. 10:47
va_list ap; va_start (ap, temp); va_arg(ap, type); va_end(temp); 참고 url : http://www.winapi.co.kr/clec/cpp2/15-3-1.htm #include #include // for va_list, va_start, ... void print(char *fmt, ...) { int i; va_list ap; va_start(ap, fmt); for (i=0; fmt[i[; i++) { if (fmt[i] != '%') putchar(fmt[i]); else switch(fmt[++i]) { case 'c' : printf("%c", va_arg(ap,char)); break; case 'd' : printf("%d", va_arg..