Did you consider rolling your own version that would not require a malloc for each insert?