No description
Find a file
Sam Lantinga e526b61873 Von: Thomas Zimmermann
Betreff: [SDL] [PATCH] Make static variables const
Datum: Tue, 19 May 2009 19:45:37 +0200

Hi,

this is a set of simple changes which make some of SDL's internal static
arrays constant. The purpose is to shrink the number of write-able
static bytes and thus increase the number of memory pages shared between
SDL applications.

The patch set is against trunk@4513. Each of the attached patch files is
specific to a sub-system. The set is completed by a second mail, because
of the list's 40 KiB limit.

The files readelf-r4513.txt and readelf-const-patch.txt where made by
calling 'readelf -S libSDL.so'. They show the difference in ELF sections
without and with the patch. Some numbers measured on my x86-64:

Before

 [13] .rodata           PROGBITS         00000000000eaaa0  000eaaa0
      0000000000008170  0000000000000000   A       0     0     32
 [19] .data.rel.ro      PROGBITS         00000000003045e0  001045e0
      00000000000023d0  0000000000000000  WA       0     0     32
 [23] .data             PROGBITS         00000000003076e0  001076e0
      0000000000004988  0000000000000000  WA       0     0     32

After

 [13] .rodata           PROGBITS         00000000000eaaa0  000eaaa0
      0000000000009a50  0000000000000000   A       0     0     32
 [19] .data.rel.ro      PROGBITS         0000000000306040  00106040
      0000000000002608  0000000000000000  WA       0     0     32
 [23] .data             PROGBITS         0000000000309360  00109360
      0000000000002e88  0000000000000000  WA       0     0     32

The size of the write-able data section decreased considerably. Some
entries became const-after-relocation, while most of its content went
straight into the read-only data section.

Best regards, Thomas

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403618
2009-06-03 04:37:27 +00:00
build-scripts Updated config.guess and config.sub 2009-03-04 09:35:32 +00:00
docs Merged revision 3472 from SDL 1.2, fixing bug #493 2007-12-29 03:25:11 +00:00
include indent 2009-05-23 22:41:08 +00:00
src Von: Thomas Zimmermann 2009-06-03 04:37:27 +00:00
test indent 2009-05-23 22:41:08 +00:00
VisualC Added missing files 2009-02-19 04:03:05 +00:00
VisualCE Unpacked project archives to get individual file history in subversion 2007-07-21 17:09:01 +00:00
Xcode Updated project with new source files 2008-12-25 04:56:44 +00:00
XCodeiPhoneOS indent 2009-05-23 22:41:08 +00:00
.indent.pro SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
acinclude.m4 Updated libtool from version 1.5.22 to 2.2.6a, so it works on current QNX 2009-03-04 08:57:30 +00:00
autogen.sh Added yet another variant of autoconf to the list 2006-05-15 06:30:38 +00:00
Borland.html
Borland.zip
BUGS Merged r2977:2978 from branches/SDL-1.2: BUGS file cutdown. 2007-02-14 10:41:55 +00:00
configure.in Added hiddi library linkage when GF target is available for QNX 2009-04-28 04:46:05 +00:00
COPYING This library is now available under the LGPL 2.1, the major change of which 2006-01-30 14:27:56 +00:00
CREDITS OpenPandora support added by David Carré 2009-05-31 11:53:12 +00:00
docs.html SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
INSTALL Date: Tue, 2 Mar 2004 11:34:54 +0100 2004-03-02 13:01:02 +00:00
Makefile.dc SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
Makefile.ds NDS compiles again, but may not yet work. Sprite support has been removed for the time being while it is re-worked. 2009-02-18 00:33:31 +00:00
Makefile.in Reverted dangerous change that could remove /bin/sh :) 2009-03-06 05:48:52 +00:00
Makefile.minimal Final merge of Google Summer of Code 2008 work... 2008-08-25 09:55:03 +00:00
Makefile.pandora OpenPandora support added by David Carré 2009-05-31 11:53:12 +00:00
NOTES Added notes on the next steps for SDL 1.3 2007-08-16 21:43:19 +00:00
README Removed AmigaOS code for 1.3 branch. 2006-10-29 04:09:17 +00:00
README-SDL.txt
README.BeOS Added a reminder on where to put libSDL.so 2006-02-18 07:21:42 +00:00
README.CVS Info on Subversion repository access. 2006-04-26 23:17:39 +00:00
README.DC *** empty log message *** 2006-03-02 13:26:24 +00:00
README.DirectFB DirectFB cleanups & simple window manager 2009-01-11 23:49:23 +00:00
README.iphoneos Final merge of Google Summer of Code 2008 work... 2008-10-04 06:46:59 +00:00
README.MacOSX Added information about gcc-fat.sh to README.MacOSX 2006-05-16 07:26:48 +00:00
README.MiNT Add teamtap support 2006-09-16 17:13:41 +00:00
README.NanoX
README.OS2 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
README.pandora OpenPandora support added by David Carré 2009-05-31 11:53:12 +00:00
README.Porting Added the dummy audio driver to instructions 2006-07-26 03:57:45 +00:00
README.QNX Update README for QNX 6.x 2009-04-24 03:46:54 +00:00
README.RISCOS Update from Alan Buckley 2006-02-06 08:47:44 +00:00
README.SVN Testing Subversion commit RSS feed. 2008-07-05 18:25:28 +00:00
README.Watcom ------- Comment #5 From Marc Peter 2006-06-25 18:03 [reply] ------- 2006-06-26 01:33:53 +00:00
README.WinCE Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode, 2006-01-19 08:43:00 +00:00
README.wscons To: sdl@libsdl.org 2005-11-22 15:19:50 +00:00
sdl-config.in Merged r3002:3003 from branches/SDL-1.2: libdir fix in sdl-config and SDL.spec 2007-04-01 03:28:36 +00:00
sdl.m4 Merged fix for bug #542 from SDL 1.2 2008-01-24 15:51:52 +00:00
sdl.pc.in Merged fix for bug #531 from SDL 1.2 revision 3511 2008-01-01 15:26:11 +00:00
SDL.spec.in Merged r3002:3003 from branches/SDL-1.2: libdir fix in sdl-config and SDL.spec 2007-04-01 03:28:36 +00:00
TODO Reminder to implement landscape mode for iPhone 2009-05-07 12:50:55 +00:00
UNDER_CONSTRUCTION.txt SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
VisualC.html Removed newline, to make sure revision control post-commit hook is working. 2008-12-01 09:45:01 +00:00
Watcom-OS2.zip SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
Watcom-Win32.zip ------- Comment #5 From Marc Peter 2006-06-25 18:03 [reply] ------- 2006-06-26 01:33:53 +00:00
WhatsNew SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 1.2

---
http://www.libsdl.org/

This is the Simple DirectMedia Layer, a general API that provides low
level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
and 2D framebuffer across multiple platforms.

The current version supports Linux, Windows, Windows CE, BeOS, MacOS,
Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.
The code contains support for Dreamcast, Atari, AIX, OSF/Tru64,
RISC OS, SymbianOS, and OS/2, but these are not officially supported.

SDL is written in C, but works with C++ natively, and has bindings to
several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
Pike, Pliant, Python, Ruby, and Smalltalk.

This library is distributed under GNU LGPL version 2, which can be
found in the file  "COPYING".  This license allows you to use SDL
freely in commercial programs as long as you link with the dynamic
library.

The best way to learn how to use SDL is to check out the header files in
the "include" subdirectory and the programs in the "test" subdirectory.
The header files and test programs are well commented and always up to date.
More documentation is available in HTML format in "docs/index.html", and
a documentation wiki is available online at:
	http://www.libsdl.org/cgi/docwiki.cgi

The test programs in the "test" subdirectory are in the public domain.

Frequently asked questions are answered online:
	http://www.libsdl.org/faq.php

If you need help with the library, or just want to discuss SDL related
issues, you can join the developers mailing list:
	http://www.libsdl.org/mailing-list.php

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)