Re: TBitmap memory allocation
- From: erewhon@xxxxxxxxxx (J French)
- Date: Wed, 20 Jul 2005 10:22:09 +0000 (UTC)
On 20 Jul 2005 01:48:58 -0700, nic@xxxxxx (Nicolai Hansen) wrote:
>Hi NG,
>
>I have a problem; I'm working on a project where we need to allocate a
>lot (up to some 5000) TBitmaps, usually very small ones, and feed them
>with data from some files.
>What we see is some strange errors (often when running this in the
>debugger, Delphi is closed with no error message). This has happened
>as we have increased the number of bitmaps allocated.
>I have tried to measure how much memory is allocated from each
>TBitmap; my result is 165 bytes on average, no matter the bitmap's
>size. This is of course nonsense and I see it as Delphi is unable to
>read how much memory the winAPI allocates for each bitmap, but only
>sees its own handle. So question one: How do I read how much memory
>that is REALLY used by my program, using Delphi 6?
>As we see this as a memory problem, we tried to upgrade a test PC from
>512 MB to 1 GB RAM just to see if it would solve the problem. It did
>not, the same thing happens, at the same amount of bitmaps loaded (I
>cannot say excactly how many this is, but it is around 2000 TBitmaps).
>I tried to use ctrl+alt+del to watch how much free memory there was in
>Windows, and it looked fine even when my program crashed. So question
>two: Does anyone have any idea what is going on here?
>And finally question three: What do I do? :S
<unsnipped>
You cannot possibly need 5000 Bitmaps in memory at the same time
- any pointers on what you are trying to do ?
.
- References:
- TBitmap memory allocation
- From: Nicolai Hansen
- TBitmap memory allocation
- Prev by Date: Re: TBitmap memory allocation
- Next by Date: Re: change the color of shapes created at runtime
- Previous by thread: TBitmap memory allocation
- Next by thread: TBitmap memory allocation
- Index(es):
Relevant Pages
|