I found "Errors In case of insufficient memory, NULL is returned. "
how to set memory, and why was it not included in example?