diff options
| author | Andrey Hristov <andrey@php.net> | 2009-06-16 09:15:09 +0000 |
|---|---|---|
| committer | Andrey Hristov <andrey@php.net> | 2009-06-16 09:15:09 +0000 |
| commit | 5d3ea92ee9cf77ba914282a592b48115159bfe9b (patch) | |
| tree | e36181ba0ca4780e05a46d8c2c44b01489ac7612 /ext/mysqlnd/mysqlnd_wireprotocol.c | |
| parent | a1fdddce494b05ed7ac71d766585ea6febe6b3c1 (diff) | |
| download | php-git-5d3ea92ee9cf77ba914282a592b48115159bfe9b.tar.gz | |
Hardwire function call instead of using callbacks. We don't actually need
callbacks, it was done for making 2 functions static, not to pollute the
global functions space but that had its price of 8 bytes overheat per
allocation, which is just too much. Also making the app member 32b instead
of 64b, which should save additional 4 byte, to the total of 12 byte per
allocation of a row buffer.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.c')
| -rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 9ff74f078c..a7bf808d63 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1326,7 +1326,7 @@ php_mysqlnd_read_row_ex(MYSQLND *conn, MYSQLND_MEMORY_POOL_CHUNK **buffer, We need a trailing \0 for the last string, in case of text-mode, to be able to implement read-only variables. */ - (*buffer)->resize_chunk((*buffer), *data_size + 1 TSRMLS_CC); + mysqlnd_mempool_resize_chunk((*buffer), *data_size + 1 TSRMLS_CC); /* The position could have changed, recalculate */ p = (*buffer)->ptr + (*data_size - header.size); } @@ -1343,7 +1343,7 @@ php_mysqlnd_read_row_ex(MYSQLND *conn, MYSQLND_MEMORY_POOL_CHUNK **buffer, } } if (ret == FAIL && (*buffer)) { - (*buffer)->free_chunk((*buffer), TRUE TSRMLS_CC); + mysqlnd_mempool_free_chunk(*buffer, TRUE TSRMLS_CC); *buffer = NULL; } *data_size -= prealloc_more_bytes; @@ -1826,7 +1826,7 @@ void php_mysqlnd_rowp_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) DBG_ENTER("php_mysqlnd_rowp_free_mem"); p = (php_mysql_packet_row *) _packet; if (p->row_buffer) { - p->row_buffer->free_chunk(p->row_buffer, TRUE TSRMLS_CC); + mysqlnd_mempool_free_chunk(p->row_buffer, TRUE TSRMLS_CC); p->row_buffer = NULL; } DBG_INF_FMT("alloca=%d persistent=%d", (int)alloca, (int)p->header.persistent); |
