Lines Matching refs:p
51 void *p = NULL; in cache_alloc() local
66 p = xcall->buffer_cache[--xcall->buffer_cache_nr]; in cache_alloc()
76 return p; in cache_alloc()
79 static int cache_free(xencall_handle *xcall, void *p, size_t nr_pages) in cache_free() argument
91 xcall->buffer_cache[xcall->buffer_cache_nr++] = p; in cache_free()
102 void *p; in buffer_release_cache() local
121 p = xcall->buffer_cache[--xcall->buffer_cache_nr]; in buffer_release_cache()
122 osdep_free_pages(xcall, p, 1); in buffer_release_cache()
130 void *p = cache_alloc(xcall, nr_pages); in xencall_alloc_buffer_pages() local
132 if ( !p ) in xencall_alloc_buffer_pages()
133 p = osdep_alloc_pages(xcall, nr_pages); in xencall_alloc_buffer_pages()
135 if (!p) in xencall_alloc_buffer_pages()
138 memset(p, 0, nr_pages * PAGE_SIZE); in xencall_alloc_buffer_pages()
140 return p; in xencall_alloc_buffer_pages()
143 void xencall_free_buffer_pages(xencall_handle *xcall, void *p, size_t nr_pages) in xencall_free_buffer_pages() argument
145 if ( p == NULL ) in xencall_free_buffer_pages()
148 if ( !cache_free(xcall, p, nr_pages) ) in xencall_free_buffer_pages()
149 osdep_free_pages(xcall, p, nr_pages); in xencall_free_buffer_pages()
172 void xencall_free_buffer(xencall_handle *xcall, void *p) in xencall_free_buffer() argument
176 if (p == NULL) in xencall_free_buffer()
179 hdr = p; in xencall_free_buffer()