src/video/ataricommon/SDL_atarimxalloc.c
author Edgar Simo <bobbens@gmail.com>
Sun, 06 Jul 2008 17:06:37 +0000
branchgsoc2008_force_feedback
changeset 2498 ab567bd667bf
parent 1895 c121d94672cb
child 2859 99210400e8b9
permissions -rw-r--r--
Fixed various mistakes in the doxygen.
slouken@281
     1
/*
slouken@281
     2
    SDL - Simple DirectMedia Layer
slouken@1312
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@281
     4
slouken@281
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@281
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@281
     9
slouken@281
    10
    This library is distributed in the hope that it will be useful,
slouken@281
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@281
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@281
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@281
    18
slouken@281
    19
    Sam Lantinga
slouken@281
    20
    slouken@libsdl.org
slouken@281
    21
*/
slouken@1402
    22
#include "SDL_config.h"
slouken@281
    23
slouken@281
    24
/*
slouken@281
    25
 *	Memory allocation
slouken@281
    26
 *
slouken@281
    27
 *	Patrice Mandin
slouken@281
    28
 */
slouken@281
    29
slouken@281
    30
#include <mint/osbind.h>
slouken@281
    31
slouken@1358
    32
#include "SDL_stdinc.h"
slouken@281
    33
slouken@281
    34
/*--- Variables ---*/
slouken@281
    35
slouken@1895
    36
static int atari_mxalloc_avail = -1;
slouken@281
    37
slouken@281
    38
/*--- Functions ---*/
slouken@281
    39
slouken@1895
    40
void *
slouken@1895
    41
Atari_SysMalloc(Uint32 size, Uint16 alloc_type)
slouken@281
    42
{
slouken@1895
    43
    /* Test if Mxalloc() available */
slouken@1895
    44
    if (atari_mxalloc_avail < 0) {
slouken@1895
    45
        atari_mxalloc_avail =
slouken@1895
    46
            ((Sversion() & 0xFF) >= 0x01) | (Sversion() >= 0x1900);
slouken@1895
    47
    }
slouken@281
    48
slouken@1895
    49
    if (atari_mxalloc_avail) {
slouken@1895
    50
        return (void *) Mxalloc(size, alloc_type);
slouken@1895
    51
    } else {
slouken@1895
    52
        return (void *) Malloc(size);
slouken@1895
    53
    }
slouken@281
    54
}
slouken@1895
    55
slouken@1895
    56
/* vi: set ts=4 sw=4 expandtab: */