Monday, April 20, 2009

Benchmark of memory allocators.

I did a benchmark test of memroy allocators.
Standard allocator, DLMalloc, LFH.
(The standard allocator is 'std::malloc' and 'std::free').

I did the test with various environment.
Fortunately, the one image can show the result. (Of course, my original document has lots of results.)


Number of threads : 4
Block size : 128
Number of allocations : 2,000,000

CPU : Intel Core2 Quad Q6700 @2.66GHz
OS : Windows Vista
RAM : 4GB

Summary : LFH is the best.

Low-fragmentation heap

Low-fragmentations heap.

Heap fragmentation is when available memory is broken into small, non-contiguous blocks. When this occurs, memory allocation can fail even though there is enough memory in the heap to satisfy the request, because no one block of memory is large enough to satisfy the allocation request.

For applications that have a low memory usage, the standard heap is adequate; allocations will not fail due to heap fragmentation. However, if the application allocates memory frequently and uses a variety of allocation sizes, memory allocation can fail due to heap fragmentation.

Windows XP and Windows Server 2003 introduce the low-fragmentation heap (LFH). This mechanism is built on top of the existing heap, but as the name implies, it reduces fragmentation of the heap. Applications that allocate large amounts of memory in various allocation sizes should use the LFH. Note that the LFH can allocate blocks up to 16 KB. For blocks greater than this, the LFH uses the standard heap.

- MSDN

------------------------------------------------------

We can use it very easily, but it's powerful.

The only remind thing is...
This feature works on Windows XP and Window 2003 server and higher.


Friday, April 17, 2009

DLMalloc


A customized memory allocator for multi platform.
(malloc / calloc / realloc / free)

I've look into it, and then I feel its a good memory allocator.
It has flexible features even keeping its good performance.
We can produce several important options.
- Memory pooling, Threshold setting, Lock mechanism for a multi threading, and more...





Wednesday, April 15, 2009

A bad DVD ROM

My DVD Rom is Matshita UJ870s.
It is on a Sony laptop.

I just tried to cook data to empty disks.
However, a burning software showed an error message a lot.
It spoiled three empty disks.

I considered for a while, and searched on web sites.
There is no information to fix that problem, unfortunately.
I had a big trouble with my dvd rom.

After several minutes, I just changed a max speed to 8x. (Its max speed is 32x basically.)
And I also checked a speed test before cooking.
Finally, I managed to do that. Oh my goodness.
Today is in 2009 year. An 8x-speed cd rom is a pretty old thing!!!!
...
...
But there is no choice. An external DVD rom drive? I think it spends money.
(Most electronic machines are very expensive in Singapore.)
I just have an option. 8x-speed cooking.
I'm very afraid what the max speed on DVD cooking is.

Sunday, April 5, 2009

Sushi

클라키에 있는 노보텔 호텔 지하에는, 메디야 라는 일본 슈퍼마켓이 있다.
일본쌀과, 일본맥주 그리고 초밥을 먹으러 종종 가곤 하는데,
한치, 오징어 회를 매우 좋아해서 거의 갈때마다 사먹고는 한다.
기본적으로는 손바닥보다 조금 더 큰 크기의 덩어리를 통째로 파는데
썰어달라고 하면 먹기 좋게 썰어주기도 한다.

그 중 장인정신이 투철한 한 스시 메이커가 보여준 스시.



먹고 가겠다고 하면 이렇게 데코레이션까지 다시 해준다.
헌데, 자세히 보면 그냥 썰어만 준게 아니라, 굉장히 잘게 칼집을 내 준 것을 확인할 수 있다.


확대한 모습.
아주 잘게 썰어주었다. 이렇게 칼집을 내주면 씹을 때 더욱 고소한 맛을 낸다.



이렇게 한 덩어리를 집어서 꼭꼭 씹으면, 고소하고도 쫄깃한 맛을 느낄 수 있다.
칼집이 제대로 잡혀있기 때문에 더더욱 맛있다.
그 스시메이커에게 감사의 박수를. 짝짝짝.

여러분들도 한치회나 오징어회를 드실 때는 꼭 칼집을 내서 드시길.
에비수 흑맥주까지 함께한다면 최고의 조합.

Yuri (Not Yuna)



출처 : 루리웹 - 취미정보게시판 - 군대갈고길동 님 글.

와....
짱이다.

지현님 뒤를 이을 차세대 주자에서 손담비양이 고군분투하던 중이였는데,
유리가 확정이네. 짱이야.

신준이, 언배, 미역, 후리자 니들맘을 이제는 이해할 수 있을 거 같네.

ps) 후리자가 윤아가 아니라고함. 난 윤아인 줄 알았쥐. 얘가 이뻐도 윤아가 최고긴 하지. 윤아 > 유리

Friday, April 3, 2009

Programmers & English

성경형 블로그에서 링크타고 간 블로그에서

정말이지 뼈저리게 공감되는 글이 있어서 링크를 검.

http://minjang.egloos.com/2276996


내가 여기서 일하고 있으면서 가장 많이 느끼는 것이

온라인 게임을 만들어봤고 경력도 많고,
나름 Server Architecture 나 Threads 등에 지식이 있다 하여도
그것을 영어로 조리있게 설명을 못하면 그냥 그건 바보인거다.

지금도 그러고 있지만, 초반에 정말 영어 못할 때에는
하고 싶은 말이 있어도 못하고, 막상하려고 하면 버벅거리고,
문서로 정리해서 줘야겠다 라고 하면 이미 타이밍을 놓쳐버린다.

그나마 다행인 것은 팀원들이 잘 견뎌준 것인데,
만약 회사가 신생회사가 아니고 잘나가는 회사에서 이런 상황이었다면
나는 1달안에 짤렸을 것이다. 아무렴.
아무리 내 머릿속에 생각이 많으면 뭘하나. 남들에게 이야기를 하지 못하는데.

아무튼 정말 중요한 것이 영어이다.
링크의 내용에도 있지만,
'훌륭한 프로그래머가 되려면 영어를 잘 해야 한다."
120% 공감한다.

Sunday, March 29, 2009

Useful Expressions

알아두면 매우 적절할 표현들.

1. So, Therefore
나만 그런지는 모르겠지만, '그래서' 라는 의미를 쓰기 위해서 So 의 사용을 많이 하는데

He is very rich, so he can buy everything.
이런 식의 형태라면 적절하게 쓰인것이다.

하지만,
He is very rich and powerful. He is very hansome, too. His parents are very famous people in the society. Blah... Blah... Blah...
So, he is the best guy.
이 부분에서는 Therefore 를 쓰는 것이 더 낫다고 한다.

정리하면, 간단한 문장과 문장을 이어주면서 '그래서' 같은 느낌으로 쓰고 싶을 때는 So.
문단과 문단을 잇거나, 긴 설명 후에 정리하는 식으로 '그러므로' 를 쓰고 싶을 때는 Therefore.
-> 물론 So 도 틀린 건 아니지만 좀 더 나은 표현을 위한 Therefore 를 알아두자.


2. Especially, In particular
얘도 So, Therefore 와 마찬가지로, 문장과 문장은 Especailly.
문단과 문단 또는 긴설명 후 '특별하게' 를 쓸 때는 In particular.


3. kindly 의 적절한 사용 예.
If you have any questions, kindly come to see me.
이런 식으로 kindly 를 사용할 수 있는데, 이는 약간의 강제적인 느낌을 준다고 한다.
또한,
Why don't you kindly do that?
여기서의 kindly 는 annoy, angry 를 내포하고 있다고 한다.
그러므로 kindly 를 사용하려 할 때는 약간의 주의가 필요할 듯 하다.
위의 예제에서 그냥 부드럽게 표현하려 할 때는 please 를 사용하거나 would like 로 대체하자.


4. 잊어버리기 쉬운 타동사. (Transitive)
to appreicate something.
-> We would greatly appreciate it if you can come.

to compliment somebody (on something)
-> My boss compliemented me on my result of the task.

to familiarize somebody (with something)
-> You should familiarize yourself with the Singapore culture.

to reserve something (for somebody)
to inform somebody (of something)
to enjoy something
to spare something
to regret something
to lay something (somebody) down


5. 편지 (Email) 의 맺음 인사.
Your faithfully (Yours faithfully) - 보통 전혀 모르는 사람에게 메일을 보냈을 때.
Your sincerely (Yours sincerely) - 알긴 알지만 대충 아는 사람.
Best Regard - 대부분에서 적절함. 특히, 어느정도 알지만 많이 가깝지는 않은 사이일 때 적절.
Thanks - Formal 형태가 아닌 메일에서는 대부분 적절. 글치만 친구나 아랫사람에게 보통 사용.
Cheers - 친구

Friday, March 27, 2009

A running course near my house



2 or 3 days in a week I run that course.
It's almost 9km distances. And It has a lot of hills and downhills.
The other 2 or 3 days, I run a half of that course. :)
And then go to gym, and then go swimming if possible.

Unfortunately, lots of things disturb my exercising. 
Overworks, fatigues, drinks... hahaha.

The image was generated by GoogleMap.


Thread & Processor

A story for CPU and threads. (A bit related to affinities)

'GetCurrentProcessorNumber'

'GetThreadTimes'

'SetThreadIdealProcessor'

CPU usuages

Multiple Processors

Thread Ordering Service

NUMA Support

Processor Group