Elsklivet / trolloc

:trollface:
GNU General Public License v3.0
2 stars 0 forks source link

Do a little trolling #4

Open Elsklivet opened 1 year ago

Elsklivet commented 1 year ago

The actual core of this project is to have the allocator do something annoying on purpose when a block is allocated or freed. My original idea was to do one of the following:

I think one or all of the above would be neat. Several require some randomness, which is why xorshift is present in the codebase, but perhaps a better solution exists (without using a crate). Maybe direct bindings to C?

Elsklivet commented 9 months ago

Simple trolling (sometimes free on alloc) has been added to both MVP and the GlobalAlloc version, but I'm leaving this issue open for inspiration to troll even more.

Elsklivet commented 6 months ago

Other ideas:

Elsklivet commented 6 months ago

Another notable issue is that currently, the trolling is not parametric and happens too often to be a subtle troll. We should raise the threshold required to trigger trolling, whatever it is, to make this pass more often.

chris-hinson commented 6 months ago

Another notable issue is that currently, the trolling is not parametric and happens too often to be a subtle troll. We should raise the threshold required to trigger trolling, whatever it is, to make this pass more often.

I like the idea of tying the likelyhood of a troll event to some combination of time since last troll event (measured as discrete number of allocs + frees) and number of currently successfully allocated blocks