support rbuffer inited from given memory