aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.h
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-11 04:34:26 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-11 04:34:26 +0000
commit21b5cde43ac7c82b1848145456b98e2c5b8e6cb1 (patch)
tree12a873c1586191a39356a7822692e841fa61508a /src/directory.h
parent6e0c4369c37df64764e3aaa49365d6560a3a3806 (diff)
downloadmpd-21b5cde43ac7c82b1848145456b98e2c5b8e6cb1.tar.gz
mpd-21b5cde43ac7c82b1848145456b98e2c5b8e6cb1.tar.xz
mpd-21b5cde43ac7c82b1848145456b98e2c5b8e6cb1.zip
ok, optimize memory sage of directorys, by iteratively creating the directories,
this code needs some serious testing: Note: The song name optimization i think is worth it, saves about 200k of ram on my syste, however, having to create directory names iteratively each time we print probably isn't worth the cpu. We only save about 10k of ram for the computer todo alot more work, and the code maybe a little messier git-svn-id: https://svn.musicpd.org/mpd/trunk@2604 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/directory.h')
-rw-r--r--src/directory.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/directory.h b/src/directory.h
index a607d254d..cb587234f 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -35,7 +35,7 @@ typedef struct _DirectoryStat {
} DirectoryStat;
typedef struct _Directory {
- char * utf8name;
+ char * name;
DirectoryList * subDirectories;
SongList * songs;
struct _Directory * parent;
@@ -75,6 +75,9 @@ int traverseAllIn(FILE * fp, char * name,
int (*forEachDir)(FILE *, Directory *, void *),
void * data);
+/* don't free this */
+char * getDirectoryPath(Directory * dir);
+
/* free the string that is returned */
char * catDirAndFileName(Directory * dir, char * filename);