Re: [hatari-devel] Feature idea/question: primitive memory manager |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Feature idea/question: primitive memory manager
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Mon, 1 Jan 2024 14:32:10 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1704119532; bh=0Ufoda7dts5SXCe62M1P1C08ZmuDIXrw3vHLO5mtAYU=; h=Date:From:To:Subject:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=PE992iWrJxWTjKb+OjI2w2NxBxp0teA1uMl/N9Imt9oRFUmTKkt46DpZdVAqfjaCj YEXLee/RkfiUhF73dqgYzSO2mG1U7Uk94eoFtUADbwHLtu0Gr6Dp7KCuNPEnGBBy+t qf7Td9BPLmUUxLvAcUz+ok+K69h95dleissf2LDcSB9yhSYAjXtBAgt52D6yuF1NIb s1tJ0g+zRkjvtGTc+AGDMLj3agmBT/6p69AmWDq05Lzr3hhwQlgSdvsnoosl+M8RLK kwFNG098o7S36UFGiYE1yMBTWUL5TKj/ILA0T/207zrNXc1aqs9do+wdskNryWx1kR +EiuORVYRl1jw==
Am Sat, 30 Dec 2023 10:03:39 +0100
schrieb Miro Kropáček <miro.kropacek@xxxxxxxxx>:
> Hi,
>
> it's possible this has been discussed/asked in the past (maybe even by
> myself ;-)) but I can't remember anymore.
>
> Is there any technical reason why Hatari couldn't provide a simple memory
> manager watching an application's memory writes and reporting if writing
> outside of the allocated area? From my naive perspective:
>
> - we already parse PRG's header
> - we can listen to application's Mshrink() so we know the memory region
> it uses
> - we can listen to M(x)alloc calls, i.e. we can pair the amount +
> returned address
> - we already know which address is memory and which is hardware
> - we can easily add a simple "if" + some sorted list of allocated places
> for each memory write
> - profit?
>
> This sounds too good to be true. So what am I missing?
Hi,
not sure whether it is really that simple. Programs also access memory
outside of the above list, like pointers in the cookie jar, the buffer
returned by the Iorec XBIOS function, etc. ... so maybe it's possible to
implement such a feature, but it's certainly a lot of work to get that
really right.
Thomas