replace maxsize to bufsize when calculating data_queue memory