andremussche / scalemm

Fast scaling memory manager for Delphi
https://code.google.com/p/scalemm/
Other
98 stars 22 forks source link

[solved] madExcept compatibility #31

Closed edwinyzh closed 6 years ago

edwinyzh commented 6 years ago

I heard good things recently about ScaleMM and I went compile and run the FastcodeMMChallenge_ScaleMM2 project with XE4, and upon starting the program madExcept caught an error, not sure if the issue is coming from madExcept or scaleMM?

The related source lines:

  if GetHeapStatus.TotalAllocated <> 0 then
    Error(reAssertionFailed);  //Memory has been already been allocated with the RTL MM

The simplified madExcept callstack: operating system : Windows 7 x64 Service Pack 1 build 7601 program up time : 194 milliseconds processors : 4x Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz physical memory : 2939/7888 MB (free/total) allocated memory : 21.50 MB largest free block : 1.39 GB executable : FastcodeMMChallenge_ScaleMM2.exe exec. date/time : 2018-08-22 12:39 version : 1.0.0.0 compiled with : Delphi XE4 madExcept version : 4.0.19 callstack crc : $cf603a98, $68a0bb76, $68a0bb76 exception number : 1 exception class : EAssertionFailed exception message : Assertion failed.

main thread ($2c2c): 004a98ca +32 FastcodeMMChallenge_ScaleMM2.exe ScaleMM2 1165 +9 ScaleMMInstall 007327d5 +09 FastcodeMMChallenge_ScaleMM2.exe ScaleMM2 1231 +1 initialization 00409a7e +42 FastcodeMMChallenge_ScaleMM2.exe System 20618 +18 InitUnits 00409ae7 +3f FastcodeMMChallenge_ScaleMM2.exe System 20690 +14 @StartExe 0040f0ee +42 FastcodeMMChallenge_ScaleMM2.exe SysInit 1160 +11 @InitExe 00733c83 +0b FastcodeMMChallenge_ScaleMM2.exe FastcodeMMChallenge_ScaleMM2 54 +0 initialization 7570343b +10 kernel32.dll BaseThreadInitThunk

cpu registers: eax = 01732740 ebx = 004a98cf ecx = 00000000 edx = 015561b8 esi = 004a98cf edi = 000000f7 eip = 004a98cf esp = 0018fec0 ebp = 0018ff08

stack dump: 0018fec0 cf 98 4a 00 de fa ed 0e - 01 00 00 00 07 00 00 00 ..J............. 0018fed0 d4 fe 18 00 cf 98 4a 00 - 40 27 73 01 cf 98 4a 00 ......J.@'s...J. 0018fee0 cf 98 4a 00 f7 00 00 00 - 08 ff 18 00 f0 fe 18 00 ..J............. 0018fef0 15 00 00 00 e4 6a 40 00 - cc 27 73 00 3e 00 00 00 .....j@..'s.>... 0018ff00 27 6b 40 00 f8 0a 74 15 - 64 ff 18 00 cf 98 4a 00 'k@...t.d.....J. 0018ff10 00 00 14 00 00 00 00 00 - 00 00 14 00 64 14 00 00 ............d... 0018ff20 30 e9 13 00 20 a9 06 00 - 20 b3 02 00 f0 8c 0a 00 0... ... ....... 0018ff30 6c 02 00 00 00 00 00 00 - f7 00 00 00 cc 27 73 00 l............'s. 0018ff40 da 27 73 00 80 9a 40 00 - 78 ff 18 00 fb 97 40 00 .'s...@.x.....@. 0018ff50 64 ff 18 00 00 00 00 00 - 00 00 00 00 90 a1 72 00 d.............r. 0018ff60 a8 a1 72 00 88 ff 18 00 - ec 9a 40 00 f3 f0 40 00 ..r.......@...@. 0018ff70 00 e0 fd 7e 88 3c 73 00 - c4 ff 18 00 ec 98 40 00 ...~.<s.......@. 0018ff80 88 ff 18 00 00 00 00 00 - 94 ff 18 00 3d 34 70 75 ............=4pu 0018ff90 00 e0 fd 7e d4 ff 18 00 - 32 98 ce 77 00 e0 fd 7e ...~....2..w...~ 0018ffa0 83 56 30 6e 00 00 00 00 - 00 00 00 00 00 e0 fd 7e .V0n...........~ 0018ffb0 00 00 00 00 df 7a b2 77 - 00 00 00 00 a0 ff 18 00 .....z.w........ 0018ffc0 00 00 00 00 ff ff ff ff - cd 4d d2 77 17 6f e5 19 .........M.w.o.. 0018ffd0 00 00 00 00 ec ff 18 00 - 05 98 ce 77 78 3c 73 00 ...........wx<s. 0018ffe0 00 e0 fd 7e 00 00 00 00 - 00 00 00 00 00 00 00 00 ...~............ 0018fff0 00 00 00 00 78 3c 73 00 - 00 e0 fd 7e 00 00 00 00 ....x<s....~....

EPluribusUnum commented 6 years ago
Hi!

ScaleMM2 must be the first unit in uses clause of the dpr/dproj.

On 2018.08.22 6:44, Edwin Yip wrote:

  I heard good things recently about ScaleMM and I went compile
    and run the FastcodeMMChallenge_ScaleMM2 project
    with XE4, and upon starting the program
    madExcept caught an error, the related lines:
    if GetHeapStatus.TotalAllocated <> 0 then
Error(reAssertionFailed);  //Memory has been already been allocated with the RTL MM

  The simplified madExcept callstack:
    operating system : Windows 7 x64 Service Pack 1 build 7601
    program up time : 194 milliseconds
    processors : 4x Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
    physical memory : 2939/7888 MB (free/total)
    allocated memory : 21.50 MB
    largest free block : 1.39 GB
    executable : FastcodeMMChallenge_ScaleMM2.exe
    exec. date/time : 2018-08-22 12:39
    version : 1.0.0.0
    compiled with : Delphi XE4
    madExcept version : 4.0.19
    callstack crc : $cf603a98, $68a0bb76, $68a0bb76
    exception number : 1
    exception class : EAssertionFailed
    exception message : Assertion failed.
  main thread ($2c2c):
    004a98ca +32 FastcodeMMChallenge_ScaleMM2.exe ScaleMM2 1165 +9
    ScaleMMInstall
    007327d5 +09 FastcodeMMChallenge_ScaleMM2.exe ScaleMM2 1231 +1
    initialization
    00409a7e +42 FastcodeMMChallenge_ScaleMM2.exe System 20618 +18
    InitUnits
    00409ae7 +3f FastcodeMMChallenge_ScaleMM2.exe System 20690 +14 @startexe
    0040f0ee +42 FastcodeMMChallenge_ScaleMM2.exe SysInit 1160 +11
    @InitExe
    00733c83 +0b FastcodeMMChallenge_ScaleMM2.exe
    FastcodeMMChallenge_ScaleMM2 54 +0 initialization
    7570343b +10 kernel32.dll BaseThreadInitThunk
  cpu registers:
    eax = 01732740
    ebx = 004a98cf
    ecx = 00000000
    edx = 015561b8
    esi = 004a98cf
    edi = 000000f7
    eip = 004a98cf
    esp = 0018fec0
    ebp = 0018ff08
  stack dump:
    0018fec0 cf 98 4a 00 de fa ed 0e - 01 00 00 00 07 00 00 00
    ..J.............
    0018fed0 d4 fe 18 00 cf 98 4a 00 - 40 27 73 01 cf 98 4a 00
    ......J.@'s...J.
    0018fee0 cf 98 4a 00 f7 00 00 00 - 08 ff 18 00 f0 fe 18 00
    ..J.............
    0018fef0 15 00 00 00 e4 6a 40 00 - cc 27 73 00 3e 00 00 00
    .....j@..'s.>...
    0018ff00 27 6b 40 00 f8 0a 74 15 - 64 ff 18 00 cf 98 4a 00
    'k@...t.d.....J.
    0018ff10 00 00 14 00 00 00 00 00 - 00 00 14 00 64 14 00 00
    ............d...
    0018ff20 30 e9 13 00 20 a9 06 00 - 20 b3 02 00 f0 8c 0a 00 0...
    ... .......
    0018ff30 6c 02 00 00 00 00 00 00 - f7 00 00 00 cc 27 73 00
    l............'s.
    0018ff40 da 27 73 00 80 9a 40 00 - 78 ff 18 00 fb 97 40 00 .'s...@.x.....@.
    0018ff50 64 ff 18 00 00 00 00 00 - 00 00 00 00 90 a1 72 00
    d.............r.
    0018ff60 a8 a1 72 00 88 ff 18 00 - ec 9a 40 00 f3 f0 40 00
    ..r.......@...@.
    0018ff70 00 e0 fd 7e 88 3c 73 00 - c4 ff 18 00 ec 98 40 00 ....<s.......@.
      0018ff80 88 ff 18 00 00 00 00 00 - 94 ff 18 00 3d 34 70 75
      ............=4pu
      0018ff90 00 e0 fd 7e d4 ff 18 00 - 32 98 ce 77 00 e0 fd 7e .......2..w...~
    0018ffa0 83 56 30 6e 00 00 00 00 - 00 00 00 00 00 e0 fd 7e
    .V0n...........~
    0018ffb0 00 00 00 00 df 7a b2 77 - 00 00 00 00 a0 ff 18 00
    .....z.w........
    0018ffc0 00 00 00 00 ff ff ff ff - cd 4d d2 77 17 6f e5 19
    .........M.w.o..
    0018ffd0 00 00 00 00 ec ff 18 00 - 05 98 ce 77 78 3c 73 00
    ...........wx<s.
    0018ffe0 00 e0 fd 7e 00 00 00 00 - 00 00 00 00 00 00 00 00 ...............
      0018fff0 00 00 00 00 78 3c 73 00 - 00 e0 fd 7e 00 00 00 00
      ....x<s........
  —
    You are receiving this because you are subscribed to this
    thread.
    Reply to this email directly, view it on GitHub, or mute the thread.
  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/andremussche/scalemm","title":"andremussche/scalemm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/andremussche/scalemm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"madExcept compatibility (#31)"}],"action":{"name":"View Issue","url":"https://github.com/andremussche/scalemm/issues/31"}}}
  [

{ "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/andremussche/scalemm/issues/31", "url": "https://github.com/andremussche/scalemm/issues/31", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "madExcept compatibility (#31)", "sections": [ { "text": "", "activityTitle": "Edwin Yip", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@edwinyzh", "facts": [ { "name": "Repository: ", "value": "andremussche/scalemm" }, { "name": "Issue #: ", "value": 31 } ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"andremussche/scalemm\",\n\"issueId\": 31,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"andremussche/scalemm\",\n\"issueId\": 31\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/andremussche/scalemm/issues/31" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 370932234\n}" } ], "themeColor": "26292E" } ]

__ Information from ESET Mail Security, version of virus signature database 17923 (20180822) __

The message was checked by ESET Mail Security. http://www.eset.com