powercisco
Super VIP
- Messages
- 9,100
Oscam1.20 svn8457
- Changeset [8457] by gf
newcamd: Add paranoid checks for per port newcamd data.
Better safe than sorry.
- Changeset [8456] by gf
Slim down struct s_port.
struct s_port contains filter array and couple of other fields that are
used only for newcamd and nothing else. They waste more than 2k in common
case.
To stop losing this much space, create private structure only for
newcamd fields and allocate it dynamically. This lowers struct s_port
size a lot and of course struct s_ptab even more because it contains
array of struct s_ports's.
New structure sizes (32-bit):
before after
struct s_port 2144 12
struct s_ptab 68612 388
struct s_config 141260 4812
Size report (32-bit):
text data bss dec hex filename
998222 1944 602344 1602510 1873ce before/oscam-1.20-unstable_svn8453-i486-slackware-linux
998174 1944 61800 1061918 10341e after/oscam-1.20-unstable_svn8453-i486-slackware-linux
bloat-o-meter report (32-bit):
add/remove: 0/1 grow/shrink: 13/16 up/down: 7897/-548383 (-540486)
function old new delta
modules 1840 9520 +7680
...
cfg 141260 4812 -136448
static.ptab 411672 - -411672
- Changeset [8455] by gf
Make ptab in struct s_module embedded not a pointer.
This blows up bss (static) memory nearly twice but we'll get that
back and lots more once we slim down struct s_port in the next
commit.
thanks LePouSAT
- Changeset [8457] by gf
newcamd: Add paranoid checks for per port newcamd data.
Better safe than sorry.
- Changeset [8456] by gf
Slim down struct s_port.
struct s_port contains filter array and couple of other fields that are
used only for newcamd and nothing else. They waste more than 2k in common
case.
To stop losing this much space, create private structure only for
newcamd fields and allocate it dynamically. This lowers struct s_port
size a lot and of course struct s_ptab even more because it contains
array of struct s_ports's.
New structure sizes (32-bit):
before after
struct s_port 2144 12
struct s_ptab 68612 388
struct s_config 141260 4812
Size report (32-bit):
text data bss dec hex filename
998222 1944 602344 1602510 1873ce before/oscam-1.20-unstable_svn8453-i486-slackware-linux
998174 1944 61800 1061918 10341e after/oscam-1.20-unstable_svn8453-i486-slackware-linux
bloat-o-meter report (32-bit):
add/remove: 0/1 grow/shrink: 13/16 up/down: 7897/-548383 (-540486)
function old new delta
modules 1840 9520 +7680
...
cfg 141260 4812 -136448
static.ptab 411672 - -411672
- Changeset [8455] by gf
Make ptab in struct s_module embedded not a pointer.
This blows up bss (static) memory nearly twice but we'll get that
back and lots more once we slim down struct s_port in the next
commit.
thanks LePouSAT