一个嵌入式flash播放器的源代码

  • e2_964819
    了解作者
  • 602.9KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-12 18:10
    上传日期
一个开源的嵌入式flash播放器的源代码。
flash播放器的源代码.rar
  • tu-testbed
  • base
  • image.cpp
    11.6KB
  • tu_opengl_includes.h
    2.1KB
  • file_util.cpp
    1.1KB
  • container.cpp
    13.5KB
  • component_hackery.cpp
    584B
  • tu_file_SDL.cpp
    2.6KB
  • triangulate_float.cpp
    1.7KB
  • ogl.h
    2KB
  • membuf.h
    1.4KB
  • postscript.h
    1.7KB
  • tu_types.h
    1.6KB
  • image_filters.cpp
    21.1KB
  • config.cpp
    10.4KB
  • membuf.cpp
    2.7KB
  • container.h
    29.9KB
  • file_util.h
    789B
  • logger.h
    1.4KB
  • postscript.cpp
    5.2KB
  • dlmalloc.c
    174.9KB
  • tu_random.cpp
    3.3KB
  • png_helper.h
    593B
  • tu_file.h
    7KB
  • utility.h
    5.1KB
  • tu_timer.h
    934B
  • tu_swap.h
    3.2KB
  • grid_index.h
    16KB
  • utf8.h
    1.1KB
  • config.h
    7.2KB
  • zlib_adapter.h
    1.1KB
  • Makefile
    1.2KB
  • tu_math.h
    990B
  • demo.cpp
    2.8KB
  • jpeg.h
    1.4KB
  • tu_types.cpp
    1.1KB
  • demo.h
    1.8KB
  • cschema.h
    7.8KB
  • triangulate_sint32.cpp
    785B
  • ogl.cpp
    12.8KB
  • smart_ptr.h
    4.9KB
  • tu_config.h
    1.9KB
  • tu_timer.cpp
    1.6KB
  • png_helper.cpp
    1.8KB
  • test_ogl.cpp
    1KB
  • triangulate.h
    1.6KB
  • image.h
    2.8KB
  • tu_random.h
    878B
  • logger.cpp
    2.1KB
  • dlmalloc.h
    24.4KB
  • utility.cpp
    2.2KB
  • utf8.cpp
    8.4KB
  • zlib_adapter.cpp
    6.3KB
  • triangulate_impl.h
    66.4KB
  • jpeg.cpp
    13.5KB
  • tu_file.cpp
    10.3KB
  • docs
  • AUTHORS
    910B
  • MANIFESTO
    984B
  • STYLE
    3.9KB
  • LICENSE
    573B
  • README
    8.9KB
  • gameswf
  • gameswf_sound.h
    461B
  • gameswf_impl.h
    19.7KB
  • gameswf_render_handler_d3d.cpp
    40.5KB
  • gameswf_types.h
    1.4KB
  • gameswf_action.cpp
    109.7KB
  • gameswf_font.cpp
    10.2KB
  • gameswf_textformat.cpp
    6KB
  • gameswf_action.h
    23.3KB
  • gameswf_string.h
    582B
  • gameswf_string.cpp
    5.1KB
  • gameswf_morph.h
    1.9KB
  • gameswf_sound_handler_sdl.cpp
    7.5KB
  • gameswf_timers.h
    2.1KB
  • gameswf_dlist.h
    3KB
  • SDL_mixer.dll
    264KB
  • gameswf_sound_handler_mp3.cpp
    5.5KB
  • gameswf_stream.cpp
    5.6KB
  • SDL.dll
    224KB
  • gameswf_morph2.h
    954B
  • gameswf_morph2.cpp
    7.4KB
  • gameswf_movie.h
    1.8KB
  • gameswf_processor.cpp
    6.9KB
  • gameswf_log.cpp
    1.5KB
  • gameswf_fontlib.h
    1.5KB
  • gameswf_xmlsocket.h
    2.2KB
  • gameswf_types.cpp
    12.9KB
  • gameswf_morph.cpp
    12.3KB
  • gameswf_button.h
    3KB
  • gameswf_parser.cpp
    13.6KB
  • gameswf_text.cpp
    29.3KB
  • extract_as_from_fla.cpp
    628B
  • gameswf_render_handler_xbox.cpp
    31.1KB
  • gameswf_movie.cpp
    17.6KB
  • gameswf_stream.h
    1.5KB
  • gameswf_sound.cpp
    12.3KB
  • gameswf_timers.cpp
    5.4KB
  • gameswf_styles.h
    2.9KB
内容介绍
/* This is a version (aka dlmalloc) of malloc/free/realloc written by Doug Lea and released to the public domain. Use, modify, and redistribute this code without permission or acknowledgement in any way you wish. Send questions, comments, complaints, performance data, etc to dl@cs.oswego.edu * VERSION 2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee) Note: There may be an updated version of this malloc obtainable at ftp://gee.cs.oswego.edu/pub/misc/malloc.c Check before installing! * Quickstart This library is all in one file to simplify the most common usage: ftp it, compile it (-O), and link it into another program. All of the compile-time options default to reasonable values for use on most unix platforms. Compile -DWIN32 for reasonable defaults on windows. You might later want to step through various compile-time and dynamic tuning options. For convenience, an include file for code using this malloc is at: ftp://gee.cs.oswego.edu/pub/misc/malloc-2.7.0.h You don't really need this .h file unless you call functions not defined in your system include files. The .h file contains only the excerpts from this file needed for using this malloc on ANSI C/C++ systems, so long as you haven't changed compile-time options about naming and tuning parameters. If you do, then you can create your own malloc.h that does include all settings by cutting at the point indicated below. * Why use this malloc? This is not the fastest, most space-conserving, most portable, or most tunable malloc ever written. However it is among the fastest while also being among the most space-conserving, portable and tunable. Consistent balance across these factors results in a good general-purpose allocator for malloc-intensive programs. The main properties of the algorithms are: * For large (>= 512 bytes) requests, it is a pure best-fit allocator, with ties normally decided via FIFO (i.e. least recently used). * For small (<= 64 bytes by default) requests, it is a caching allocator, that maintains pools of quickly recycled chunks. * In between, and for combinations of large and small requests, it does the best it can trying to meet both goals at once. * For very large requests (>= 128KB by default), it relies on system memory mapping facilities, if supported. For a longer but slightly out of date high-level description, see http://gee.cs.oswego.edu/dl/html/malloc.html You may already by default be using a C library containing a malloc that is based on some version of this malloc (for example in linux). You might still want to use the one in this file in order to customize settings or to avoid overheads associated with library versions. * Contents, described in more detail in "description of public routines" below. Standard (ANSI/SVID/...) functions: malloc(size_t n); calloc(size_t n_elements, size_t element_size); free(Void_t* p); realloc(Void_t* p, size_t n); memalign(size_t alignment, size_t n); valloc(size_t n); mallinfo() mallopt(int parameter_number, int parameter_value) Additional functions: independent_calloc(size_t n_elements, size_t size, Void_t* chunks[]); independent_comalloc(size_t n_elements, size_t sizes[], Void_t* chunks[]); pvalloc(size_t n); cfree(Void_t* p); malloc_trim(size_t pad); malloc_usable_size(Void_t* p); malloc_stats(); * Vital statistics: Supported pointer representation: 4 or 8 bytes Supported size_t representation: 4 or 8 bytes Note that size_t is allowed to be 4 bytes even if pointers are 8. You can adjust this by defining INTERNAL_SIZE_T Alignment: 2 * sizeof(size_t) (default) (i.e., 8 byte alignment with 4byte size_t). This suffices for nearly all current machines and C compilers. However, you can define MALLOC_ALIGNMENT to be wider than this if necessary. Minimum overhead per allocated chunk: 4 or 8 bytes Each malloced chunk has a hidden word of overhead holding size and status information. Minimum allocated size: 4-byte ptrs: 16 bytes (including 4 overhead) 8-byte ptrs: 24/32 bytes (including, 4/8 overhead) When a chunk is freed, 12 (for 4byte ptrs) or 20 (for 8 byte ptrs but 4 byte size) or 24 (for 8/8) additional bytes are needed; 4 (8) for a trailing size field and 8 (16) bytes for free list pointers. Thus, the minimum allocatable size is 16/24/32 bytes. Even a request for zero bytes (i.e., malloc(0)) returns a pointer to something of the minimum allocatable size. The maximum overhead wastage (i.e., number of extra bytes allocated than were requested in malloc) is less than or equal to the minimum size, except for requests >= mmap_threshold that are serviced via mmap(), where the worst case wastage is 2 * sizeof(size_t) bytes plus the remainder from a system page (the minimal mmap unit); typically 4096 or 8192 bytes. Maximum allocated size: 4-byte size_t: 2^32 minus about two pages 8-byte size_t: 2^64 minus about two pages It is assumed that (possibly signed) size_t values suffice to represent chunk sizes. `Possibly signed' is due to the fact that `size_t' may be defined on a system as either a signed or an unsigned type. The ISO C standard says that it must be unsigned, but a few systems are known not to adhere to this. Additionally, even when size_t is unsigned, sbrk (which is by default used to obtain memory from system) accepts signed arguments, and may not be able to handle size_t-wide arguments with negative sign bit. Generally, values that would appear as negative after accounting for overhead and alignment are supported only via mmap(), which does not have this limitation. Requests for sizes outside the allowed range will perform an optional failure action and then return null. (Requests may also also fail because a system is out of memory.) Thread-safety: NOT thread-safe unless USE_MALLOC_LOCK defined When USE_MALLOC_LOCK is defined, wrappers are created to surround every public call with either a pthread mutex or a win32 spinlock (depending on WIN32). This is not especially fast, and can be a major bottleneck. It is designed only to provide minimal protection in concurrent environments, and to provide a basis for extensions. If you are using malloc in a concurrent program, you would be far better off obtaining ptmalloc, which is derived from a version of this malloc, and is well-tuned for concurrent programs. (See http://www.malloc.de) Compliance: I believe it is compliant with the 1997 Single Unix Specification (See http://www.opennc.org). Also SVID/XPG, ANSI C, and probably others as well. * Synopsis of compile-time options: People have reported using previous versions of this malloc on all versions of Unix, sometimes by tweaking some of the defines below. It has been tested most extensively on Solaris and Linux. It is also reported to work on WIN32 platforms. People also report using it in stand-alone embedded systems. The implementation is in straight, hand-tuned ANSI C. It is not at all modular. (Sorry!) It uses a lot of macros. To be at all usable, this code should be compiled using an optimizing compiler (for example gcc -O3) that can simplify expressions and control paths. (FAQ: some macros import variables as arguments rather than declare locals because people reported that some debuggers otherwise get confused.) OPTION DEFAULT VALUE Compilation Environment options: __STD_C
评论
    相关推荐