git: libdevattr - Visibility change, stop memory waste

看板DFBSD_commit作者時間15年前 (2010/07/17 17:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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
文章代碼(AID): #1CGN5Iwn (DFBSD_commit)