[ scummvm-Bugs-610013 ] Memory Leaks

noreply at sourceforge.net noreply at sourceforge.net
Mon Sep 16 18:36:51 CEST 2002


Bugs item #610013, was opened at 2002-09-16 18:36
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=610013&group_id=37116

Category: Unknown Crash/Other
Group: All Games
Status: Open
Resolution: None
Priority: 5
Submitted By: Richard (trinity78)
Assigned to: Nobody/Anonymous (nobody)
Summary: Memory Leaks

Initial Comment:
latest daily build 15. sept. 2002.
OS: Win2000 Adv. Server.
Checked with "Day of the Tentacle", played the intro for 
10-20 seconds then exited.
I've used numegas boundschecker for this. I'm not sure if 
boundschecker works 100 % perfect.

1.)
main.cpp 52 bytes allocated
code: scummcfg = new Config
(scummhome, "scummvm");

2.)
map.h 52 bytes allocated
code: node = new Node(key, prevNode);

3.)
str.cpp 4 bytes allocated
code: _refCount = new int(1);

5.)
str.cpp 21 bytes allocated
code: _str = (char *)calloc(1, _capacity+1);

6.)
map.h 40 bytes allocated
code: _header = new Node();

7.)
str.h 4 bytes allocated
code: String() : _capacity(0) { _refCount = new int(1); }

8.)
map.h 52 bytes allocated
code: _header = new Node();

9.)
gameDetector.cpp 16 bytes allocated
code: String() : _gameDataPath = strdup(val);

11.)
imuse.cpp 4 bytes allocated
code: IMuse *i = new IMuse;

12.)
gameDetector.cpp 16 bytes allocated
code: _gameDataPath = (char *)malloc((strlen
(slashless) + 2) * sizeof(char));

13.)
sdl.cpp 176 bytes allocated
code: return new OSystem_SDL_Normal();

14.)
mididrv.cpp 32 bytes allocated
code: return new MidiDriver_WIN();

15.)
enigne.cpp 11356 bytes allocated
code: engine = new Scumm_v6(detector, syst);

15.)
enigne.cpp 160 bytes allocated
code: _mixer = new SoundMixer();

16.)
mixer.cpp 512 bytes allocated
code: _volumeTable = (int16 *)calloc(256 * sizeof(int16), 
1);

17.)
scummvm.cpp 3592 bytes allocated
code: _gui = new Gui();

18.)
scummvm.cpp 84 bytes allocated
code: _timer = new Timer(this);

19.)
resource.cpp 40 bytes allocated
code: res.address[id] = (byte **)calloc(num, sizeof(void 
*));

20.)
resource.cpp 84 bytes allocated
code: _timer = new Timer(this);

21.)
resource.cpp 10 bytes allocated
code: res.flags[id] = (byte *)calloc(num, sizeof(byte));

21.)
resource.cpp 50 bytes allocated
code: _arrays = (byte *)calloc(_numArray, 1);

22.)
scummvm.cpp 30636 bytes allocated
code: _bundle = new Bundle();

22.)
scummvm.cpp 1300 bytes allocated
code: _sound = new Sound(this);

23.)
imuse.cpp 5096 bytes allocated
code: IMuseInternal *i = new IMuseInternal;

24.)
imuse.cpp 360 bytes allocated
code: driv = new IMuseGM(midi);

25.)
resource.cpp 4166 bytes allocated
code: CHECK_HEAP ptr = (byte *)calloc(size + sizeof
(MemBlkHeader) + SAFETY_AREA, 1);

26.)
scummvm.cpp 11520 bytes allocated
code: _actors = new Actor[MAX_ACTORS];

27.)
sound.cpp 8 bytes allocated
code: File * file = new File();

28.)
resource.cpp 256 bytes allocated
code: _shadowPalette = (byte *)calloc
(_shadowPaletteSize, 1);

29.)
resource.cpp 800 bytes allocated
code: _objectOwnerTable = (byte *)calloc
(_numGlobalObjects, 1);

30.)
resource.cpp 800 bytes allocated
code: _objectStateTable = (byte *)calloc
(_numGlobalObjects, 1);

31.)
resource.cpp 3200 bytes allocated
code: _classData = (uint32 *)calloc(_numGlobalObjects, 
sizeof(uint32));

32.)
resource.cpp 100 bytes allocated
code: _newNames = (uint16 *)calloc(_numNewNames, 
sizeof(uint16));

33.)
resource.cpp 160 bytes allocated
code: _inventory = (uint16 *)calloc(_numInventory, sizeof
(uint16));

34.)
resource.cpp 1500 bytes allocated
code: _verbs = (VerbSlot *)calloc(_numVerbs, sizeof
(VerbSlot));

35.)
resource.cpp 5600 bytes allocated
code: _objs = (ObjectData *)calloc(_numLocalObjects, 
sizeof(ObjectData));

36.)
resource.cpp 1600 bytes allocated
code: _vars = (int16 *)calloc(_numVariables, sizeof
(int16));

37.)
resource.cpp 256 bytes allocated
code: _bitVars = (byte *)calloc(_numBitVariables >> 3, 
1);

38.)
resource.cpp 397 bytes allocated
code: res.roomno[id] = (byte *)calloc(num, sizeof(byte));

39.)
resource.cpp 1588 bytes allocated
code: res.roomoffs[id] = (uint32 *)calloc(num, sizeof
(uint32));

according to boundschecker all this allocated but never 
freed.


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=610013&group_id=37116




More information about the Scummvm-tracker mailing list