How do i know how much memory my program is using?

Find quick help here to get you started with Hollywood
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: How do i know how much memory my program is using?

Post by Bugala »

Continuation question to memory.

I just tried to play AOS3 version of "ducks of apocalypse" with Amikit.

To my surprise, it took about 150 Mb of memory to get to the point it even starts.

The filesize of the whole game is only 25+ mb.

How exactly does this @SAMPLE using MP3s actually work memory wise? Is it after all better to just use Wavs, for i would imagine Wavs would take the same amount of memory to use.
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: How do i know how much memory my program is using?

Post by airsoftsoftwair »

Well, you know that MP3s are compressed. In memory uncompressed PCM data is VERY large. 3 minutes of 44.1khz 16bit stereo audio will eat up 44100*4*180 bytes, i.e. almost 30 megabyte. Better keep that in mind...
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: How do i know how much memory my program is using?

Post by Bugala »

returning to this topic too.

I now made version of ducks of apocalypse that isnt using samples anymore at all, but all the music and samples are as @MUSICs instead, in practice playing 2 Musics at same time (one real background music, and one talksamples that are played as music).

To my understanding, these were supposedly not loaded to memory anymore, but are played from harddisk as needed so to say.

Previously it took over 200 Mb of memory to get the game started even, now it is maybe 120 Mb of memory anymore. But still, isnt that quite much still if they are not laoded to memory anymore?

Hence, how does this work, is every music always streamed, or does it depend upon their length or something?
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: How do i know how much memory my program is using?

Post by airsoftsoftwair »

Yes, musics are always streamed, regardless of their size. If your program still uses 120 MB of memory, then try to reduce the number of images that you preload in memory. NB: You can start Hollywood with the RESOURCEMONITOR argument to keep track of your resources. The resource monitor can also help you to discover programming mistakes which lead to constantly growing memory consumption.
Post Reply