看板 DFBSD_commit 關於我們 聯絡資訊
commit 3bbbc629a1226c53dfdeeb2ea6319b4c0fb8c94c Author: Alex Hornung <ahornung@gmail.com> Date: Sat Jul 17 09:46:10 2010 +0100 libdevattr - Visibility change, stop memory waste * Change the visibility of some function prototypes in devattr.h to be only visible from within libdevattr (or when LIBDEVATTR_INTERNAL is specified). * Stop wasting memory when reading the socket. Since we receive the size of the remaining data first, we can allocate exactly the right amount instead of wasting it big time by allocating 12MB no matter what. Summary of changes: lib/libdevattr/devattr.c | 23 ++++++++++++++--------- lib/libdevattr/devattr.h | 10 +++++++++- lib/libdevattr/devattr_device.c | 1 + lib/libdevattr/devattr_enumerate.c | 1 + lib/libdevattr/devattr_monitor.c | 9 ++------- 5 files changed, 27 insertions(+), 17 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3bbbc629a1226c53dfdeeb2ea6319b4c0fb8c94c -- DragonFly BSD source repository