[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stl vector for short int - (alignment)
From: |
Markus Wawryniuk |
Subject: |
stl vector for short int - (alignment) |
Date: |
Wed, 25 Apr 2001 15:10:07 +0200 |
Hi,
I have written a program with a huge need for vector<int>. Now I want to
reduce the need by using vector<short>. But program's memory usage is
reduced only by 1 MB. Not by factor 2.
Why?
I think the problem is the memory alignment: Each short is stored /
addressed in one int.
Can I force the stl vector to store two shorts in one int? Or is there
another library which fits my needs?
Thanks in advance
Markus
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- stl vector for short int - (alignment),
Markus Wawryniuk <=