Author Topic: Memory Protection  (Read 451 times)

trekiej

  • Member
  • ***
  • Posts: 163
  • Karma: +1/-0
Memory Protection
« on: October 24, 2019, 01:26:57 AM »
When should it be added?
Now or later?

wawa

  • Senior Member
  • ****
  • Posts: 252
  • Karma: +1/-0
Re: Memory Protection
« Reply #1 on: October 24, 2019, 01:58:19 AM »
and how do you think it might work?

trekiej

  • Member
  • ***
  • Posts: 163
  • Karma: +1/-0
Re: Memory Protection
« Reply #2 on: October 24, 2019, 04:14:19 AM »
Ugh, you got me. I have no idea.

jacko

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Memory Protection
« Reply #3 on: October 24, 2019, 11:16:34 AM »
There is a new allocmemprotect call which allocates memory which is protected fron other task/processes and which gets freed when the process ends or gets killed. All system task like intuition, dos and exec have full access to it. Access from all other is restricted depending on allocmemprotect protection parameter

Just as first idea

Samurai_Crow

  • Newbie
  • *
  • Posts: 48
  • Karma: +0/-0
  • Hobby coder
Re: Memory Protection
« Reply #4 on: October 24, 2019, 08:42:59 PM »
On OS4 there's already a MEMF_PRIVATE flag that does something like what you describe.  It doesn't do much for crash protection though.

SafeC as managed code would make a bigger difference without straining the MMU muscles.  Maybe that would be a wiser alternative to memory paging.

wawa

  • Senior Member
  • ****
  • Posts: 252
  • Karma: +1/-0
Re: Memory Protection
« Reply #5 on: October 24, 2019, 08:45:39 PM »
we do have that flag as well as far as i recall.

miker1264

  • Senior Member
  • ****
  • Posts: 327
  • Karma: +12/-1
Re: Memory Protection
« Reply #6 on: October 24, 2019, 09:04:50 PM »
we do have that flag as well as far as i recall.

I believe I have seen it as well. Not sure if there is much benefit in using it though.

jacko

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Memory Protection
« Reply #7 on: October 25, 2019, 05:36:23 PM »
1. nearly no program uses this flag because it's too restrictive, you cant use it for system functions (remember what I wrote, Intuition/dos and so on should have full access)
2. it does not track memory, if the program crashes you cant "remove" these memory areas
3. it certainly needs some more functions like change access parameter, check access
4. it needs memory pooling (like AllocPooled) because of the MMU pagesize (usually 4k)
5. SafeC and managed code does prevent nothing without MMU  protection as long you are not the only program in memory (the memory manager in managed code can have the same errors, and one not safeC/managed code program can destroy all other)
6. it's would be start and better as current situation