Fix alloc-dealloc mismatch reported by ASan (malloc vs. C++ delete).

Signed-off-by: David Anderson <dave@natulte.net>
Fix alloc-dealloc mismatch reported by ASan (new[] vs. delete).

Signed-off-by: David Anderson <dave@natulte.net>
Fix stack buffer overflow reported by ASan.

Signed-off-by: David Anderson <dave@natulte.net>
os: WBThrottle: optimize its map and cond.Wait()
Using unordered_map to save the cpu cost and acceralate map::find() operation. Also, do not call Signal() at all time when we queue_wb(), just call Signal when it really cond.wait() on lock. When use SSD as Journal, backend dirty_io is always greater than the writeback limitation we set, therefore, the thread will be always working and no need to Signal(). So it would be meaningful

Signed-off-by: Ning Yao <zay11022@gmail.com>

Remove _wait

Signed-off-by: Ning Yao <zay11022@gmail.com>

fix code format

Signed-off-by: Ning Yao <zay11022@gmail.com>

remove extra brackets and space

Signed-off-by: Ning Yao <zay11022@gmail.com>

Unnecessary change to braces. rollback

Signed-off-by: Ning Yao <zay11022@gmail.com>