1. A method comprising: based on one or more characteristics of an XML data source, determining a memory size for an XML event-generating process to process said XML data source; prior to processing the XML data source using the XML event-generating process, requesting, from a memory manager, allocation of a memory chunk of the memory size for use with the XML event-generating process; processing the XML data source using the XML event-generating process, thereby generating one or more XML events, wherein processing the XML data source comprises: the XML event-generating process determining that processing the XML data source requires the use of a plurality of memory buffers; and the XML event-generating process creating the plurality of memory buffers in the previously allocated memory chunk, without calling the memory manager; and after processing the XML data source, requesting that the memory manager deallocate the memory chunk; wherein the method is performed by one or more computing devices.