///////////////////////////////////////////////////////////////////////////////
// EAGeneralAllocatorDebugAirplay.cpp
//
// Copyright (c) 2010, Electronic Arts. All Rights Reserved.
// By Paul Pedriana
///////////////////////////////////////////////////////////////////////////////

#include <PPMalloc/internal/config.h>
#include <PPMalloc/internal/callstack.h>

#if !PPM_USE_EATHREAD_CALLSTACK

#include <EABase/eabase.h>

// Airplay
// www.airplaysdk.com
//
// As of this writing, our Airplay nant-based build system doesn't have the 
// ability to choose beteen ARM vs. PC targets in the build system, so we 
// implement this Airplay-specific file here and choose the code to compile
// via ifdefs.

#if defined(EA_PROCESSOR_ARM)

    #include <PPMalloc/../../source/arm/EAGeneralAllocatorDebugArm.cpp>

#elif defined(EA_PROCESSOR_X86)

    // Currently Airplay doesn't let you access Win32 functionality, even in a debug build.
    // So we can't use our existing Win32 callstack code. So we just make a dummy version
    // here which is empty. The EACallstack package does have some generic x86 callstack 
    // code which we could probably copy into here.

    #include <stdio.h>

    namespace EA
    {
        namespace Allocator
        {

            PPM_API void InitCallstack()
            {
            }


            PPM_API void ShutdownCallstack()
            {
            }


            PPM_API size_t GetCallStack(void* /*pReturnAddressArray*/[], size_t /*nReturnAddressArrayCapacity*/)
            {
                return 0;
            }


        } // namespace Allocator

    } // namespace EA

#endif

#endif








