debuf memwriter prealloc