Opened 8 years ago

Closed 5 years ago

Last modified 4 years ago

#711 closed bug (fixed)

shutdownHaskell() does not return allocated memory on Unix

Reported by: lennart.augustsson@… Owned by: simonmar
Priority: high Milestone: 6.12.1
Component: Runtime System Version: 6.5
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Easy (less than 1 hour)
Test Case: N/A Blocked By:
Blocking: Related Tickets:

Description

Calling shutdownHaskell() doesn't actually return the memory allocated.
This can be very bad when loading and unloading DLLs many times.

Attachments (2)

rts.patch (35.3 KB) - added by lennart.augustsson@… 8 years ago.
Patch to deallocate memory for win32.
rts.dpatch (197.3 KB) - added by thoughtpolice 5 years ago.
patch to fix bug on unix

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by lennart.augustsson@…

Patch to deallocate memory for win32.

comment:1 Changed 8 years ago by simonmar

  • Component changed from Compiler to Runtime System
  • Milestone set to 6.4.2
  • Owner set to simonmar

comment:2 Changed 8 years ago by simonpj

Lennart says "I'm not implying anything, except that I've plugged the space
leak of 256M every time a DLL is loaded & unloaded." See the attached patch.

comment:3 Changed 8 years ago by simonmar

  • Milestone 6.4.2 deleted
  • Priority changed from normal to low
  • severity changed from normal to minor
  • Summary changed from shutdownHaskell() does not return allocated memory to shutdownHaskell() does not return allocated memory on Unix

committed; thanks. Problem still not addressed on Unix, so I've left the bug open.

comment:4 Changed 8 years ago by igloo

  • Milestone set to 6.6.1
  • Test Case set to N/A

comment:5 Changed 7 years ago by simonmar

  • Milestone changed from 6.6.1 to _|_

Milestone _|_: this doesn't affect anyone (yet)

comment:6 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:7 Changed 6 years ago by simonmar

  • Operating System changed from Multiple to Unknown/Multiple

Changed 5 years ago by thoughtpolice

patch to fix bug on unix

comment:8 Changed 5 years ago by thoughtpolice

  • Owner changed from simonmar to igloo

Hopefully this patch should fix this issue.

Fri Mar 20 07:49:57 CDT 2009  Austin Seipp <mad.one@gmail.com>
  * FIX #711 implement osFreeAllMBlocks for unix

I'm assigning this to igloo so he can take a look at it and merge it when necessary into HEAD I suppose (I've run validate and everything turned up OK.)

comment:9 Changed 5 years ago by simonmar

  • Milestone changed from _|_ to 6.12.1
  • Owner changed from igloo to simonmar
  • Priority changed from low to high

Just noticed this patch. I'll review and commit.

comment:10 Changed 5 years ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed

Applied, thanks!

Thu Sep 10 01:46:30 PDT 2009  Austin Seipp <mad.one@gmail.com>
  * FIX #711 implement osFreeAllMBlocks for unix

comment:11 Changed 4 years ago by simonmar

  • Difficulty changed from Easy (1 hr) to Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.