Factor when run in debug mode actually clears memory. See
bump_allocator.hpp. Unfortunately clearing memory is slow as hell. The time
complexity of copying gc is proportional to the number of surviving
objects. But if you want to clear memory too it becomes proportional to the
total number of allocated objects.

Plus, relying on the gc to zero out sensitive memory is a bad idea. You
never know when the gc runs or if it runs at all. That's why it is
considered bad practice in Java to use finalizers. I think it would be
better to use the destructors vocab to implement zeroing out of sensitive
memory.

2018-01-16 23:17 GMT+01:00 Alexander Ilin <ajs...@yandex.ru>:

> Hello!
>
>   I was reading a manual on the `8th` language, and noticed an interesting
> feature.
>   Apparently, it's possible to call a word on a memory buffer and thereby
> mark it as "sensitive information".
>   GC would zero the memory upon release.
>
>   Zeroing every bit of memory on release would add a lot of overhead (as I
> understand), but selectively clearing it like this could help with security
> applications that deal with certificates and passwords and stuff. This is
> especially useful, because in Factor GC can relocate (= copy) objects in
> memory. Does it clean up the memory it copied?
>
>   Do we have such a feature? Is it difficult to implement?
>   Bjourne, you've seen a lot of the runtime, can you comment?
>
> ---=====---
>  Александр
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>



-- 
mvh/best regards Björn Lindqvist
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to