mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-20 01:22:44 +00:00
0ebb0717b0
The tests fail as they exercise how the cache *SHOULD* work rather than
how it does now.
The tests do currently pass for the pending work I've done on the cache
system, but while working on it, I remembered why I reworked cache
allocation...
The essential problem is that sounds are loaded into the cache, which is
fine for synchronous output targets, but has proven to be a minefield
for asynchronous output targets (JACK, ALSA).
The reason for the minefield is the hunk takes priority over the cache,
and is free to move cache blocks around, and *even dispose of them
entirely* in order to satisfy memory allocations from either end of the
hunk. Doing this in an entirely single-threaded process (as DOS Quake
was) is perfectly safe, as the users of the cache just reload the
pointer each time, and bail if it's null (meaning the block has been
freed), or even cause the data to be reloaded if possible (I'm a little
fuzzy on the details for that as I didn't write that code). However, in
multi-threaded code, especially real-time (JACK, possibly ALSA), it's a
recipe for disaster. The
|
||
---|---|---|
.. | ||
Makemodule.am | ||
test-bary.c | ||
test-baryvf.c | ||
test-bitop.c | ||
test-bsearch.c | ||
test-cexpr.c | ||
test-cmem.c | ||
test-cs.c | ||
test-csvf.c | ||
test-darray.c | ||
test-dq.c | ||
test-half.c | ||
test-heapsort.c | ||
test-listener.c | ||
test-mat3.c | ||
test-mat4.c | ||
test-plist.c | ||
test-pqueue.c | ||
test-qfs.c | ||
test-quat.c | ||
test-seb.c | ||
test-sebvf.c | ||
test-seg.c | ||
test-set.c | ||
test-simd.c | ||
test-utf8.c | ||
test-zone.c |