OSDN Git Service

RIO-8117: Removed unused code oscl_mempool_allocator.h/.cpp
authorPacketVideo CM <engbuild@pv.com>
Thu, 10 Dec 2009 20:40:20 +0000 (12:40 -0800)
committerPacketVideo CM <engbuild@pv.com>
Thu, 10 Dec 2009 20:40:20 +0000 (12:40 -0800)
engines/2way/src/pv_2way_sdkinfo.h
engines/author/src/pv_author_sdkinfo.h
engines/player/src/pv_player_sdkinfo.h
oscl/oscl/osclerror/Android.mk
oscl/oscl/osclerror/build/make/local.mk
oscl/oscl/osclerror/src/oscl_mempool_allocator.cpp [deleted file]
oscl/oscl/osclerror/src/oscl_mempool_allocator.h [deleted file]

index dfe0f94..2e43d90 100644 (file)
@@ -21,7 +21,7 @@
 // This header file is automatically generated at build-time
 // *** OFFICIAL RELEASE INFO -- Will not auto update
 
-#define PV2WAY_ENGINE_SDKINFO_LABEL "CORE_8.003.1.1"
-#define PV2WAY_ENGINE_SDKINFO_DATE 0x20091128
+#define PV2WAY_ENGINE_SDKINFO_LABEL "1114000"
+#define PV2WAY_ENGINE_SDKINFO_DATE 0x20091130
 
 #endif //PV_2WAY_SDKINFO_H_INCLUDED
index 067d02b..901dac2 100644 (file)
@@ -21,7 +21,7 @@
 // This header file is automatically generated at build-time
 // *** OFFICIAL RELEASE INFO -- Will not auto update
 
-#define PVAUTHOR_ENGINE_SDKINFO_LABEL "CORE_8.003.1.1"
-#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20091128
+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1114000"
+#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20091130
 
 #endif //PV_AUTHOR_SDKINFO_H_INCLUDED
index 1f9494a..88e19c2 100644 (file)
@@ -21,7 +21,7 @@
 // This header file is automatically generated at build-time
 // *** OFFICIAL RELEASE INFO -- Will not auto update
 
-#define PVPLAYER_ENGINE_SDKINFO_LABEL "CORE_8.003.1.1"
-#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20091128
+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1114000"
+#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20091130
 
 #endif //PV_PLAYER_SDKINFO_H_INCLUDED
index a6e382f..90c7fd0 100644 (file)
@@ -5,7 +5,6 @@ LOCAL_SRC_FILES := \
        src/oscl_errno.cpp \
        src/oscl_error.cpp \
        src/oscl_error_imp_jumps.cpp \
-       src/oscl_mempool_allocator.cpp \
        src/oscl_error_trapcleanup.cpp \
        src/oscl_heapbase.cpp
 
@@ -35,7 +34,6 @@ LOCAL_COPY_HEADERS := \
        src/oscl_error_imp_fatalerror.h \
        src/oscl_error_imp.h \
        src/oscl_error_imp_jumps.h \
-       src/oscl_mempool_allocator.h \
        src/oscl_error_trapcleanup.h \
        src/oscl_exception.h \
        src/oscl_heapbase.h \
index 141211e..98a8b01 100644 (file)
@@ -14,7 +14,6 @@ INCSRCDIR = ../../src
 SRCS =  oscl_errno.cpp \
        oscl_error.cpp \
        oscl_error_imp_jumps.cpp \
-       oscl_mempool_allocator.cpp \
        oscl_error_trapcleanup.cpp \
        oscl_heapbase.cpp
 
@@ -26,7 +25,6 @@ HDRS =  oscl_errno.h \
        oscl_error_imp_fatalerror.h \
        oscl_error_imp.h \
        oscl_error_imp_jumps.h \
-       oscl_mempool_allocator.h \
        oscl_error_trapcleanup.h \
        oscl_exception.h \
        oscl_heapbase.h \
diff --git a/oscl/oscl/osclerror/src/oscl_mempool_allocator.cpp b/oscl/oscl/osclerror/src/oscl_mempool_allocator.cpp
deleted file mode 100644 (file)
index 67f7ff0..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-//               O S C L _ M E M P O O L _ A L L O C A T O R
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-/*! \addtogroup osclerror OSCL Error
- *
- * @{
- */
-
-
-/*! \file oscl_mempool_allocator.cpp
-    \brief This file contains the implementation of memory pool allocator for leave/trap
-*/
-
-/***************************************************************************************
-File Name       : oscl_mempool_allocator.cpp
-Description     : File containing implementation of class OsclMemPoolAllocator that provides
-                  methods for creating, deleting memory pool.
-Coding History  :
-                  Achint Kaur           April 11, 2006      Initial Draft
-***************************************************************************************/
-
-#include "oscl_mempool_allocator.h"
-
-#include "oscl_exception.h"
-
-#include "oscl_mem_basic_functions.h"
-
-/***************************************************************************************
-Description     : Constructor method for memory pool allocation. Sets iCustomAllocator
-                  to the passed allocator pointer. Also initializes iBaseAddress to NULL.
-Arguments       : gen_alloc - Custom allocator for memory. This is an input argument.
-Return Values   : None
-Assumptions     : None
-Known Issues    : None
-***************************************************************************************/
-OsclMemPoolAllocator::OsclMemPoolAllocator(Oscl_DefAlloc* gen_alloc)
-        : iBaseAddress(0)
-{
-    iAlloc = (gen_alloc) ? gen_alloc : &iDefAlloc;
-}
-
-/***************************************************************************************
-Description     : Virtual destructor for memory pool allocation. Calls DestroyMemPool, if
-                  iBaseAddress is not NULL i.e. memory pool exists.
-Arguments       : None
-Return Values   : None
-Assumptions     : None
-Known Issues    : None
-***************************************************************************************/
-OsclMemPoolAllocator::~OsclMemPoolAllocator()
-{
-    if (iBaseAddress)
-    {
-        DestroyMemPool();
-    }
-}
-
-/***************************************************************************************
-Description     : Method for creating memory pool given the number of chunks and chunk size.
-Arguments       : aNumChunk - Default number of chunks in a memory pool is 2.
-                  aChunkSize - Default size of each chunk is 4.
-Return Values   : OsclAny* - Base address for the memory pool
-Assumptions     : It is assumed that memory audit is not required so, _oscl_malloc used directly.
-                  Client can pass its custom allocator for memory.
-                  Malloc will be used if custom allocator is not set.
-                  Memory alignment is taken from osclmemory.
-                  uint32 and int32 are assumed to be oscl compliant.
-Known Issues    : Is there a naming convention for leaving methods in oscl ?
-                  Is there a need for memory alignment as done ?
-                  Is OSCL_MEM_FILL_WITH_PATTERN required ?
-***************************************************************************************/
-OsclAny* OsclMemPoolAllocator::CreateMemPool(const uint32 aNumChunk, const uint32 aChunkSize)
-{
-    if (aNumChunk == 0 || aChunkSize == 0)
-    {
-        OSCL_LEAVE(OsclErrArgument);
-
-        // OSCL_UNUSED_RETURN(NULL);    This statement was removed to avoid compiler warning for Unreachable Code
-    }
-
-    // Heap memory alligned chunk size
-    uint32 lChunkSizeMemAligned;
-
-    lChunkSizeMemAligned = oscl_mem_aligned_size(aChunkSize);
-
-    iBaseAddress = iAlloc->ALLOCATE(aNumChunk * lChunkSizeMemAligned);
-
-    if (iBaseAddress == NULL)
-    {
-        OSCL_LEAVE(OsclErrNoMemory);
-
-        // OSCL_UNUSED_RETURN(NULL);    This statement was removed to avoid compiler warning for Unreachable Code
-
-    }
-
-#if OSCL_MEM_FILL_WITH_PATTERN
-
-    oscl_memset(iMemPool, 0x55, aNumChunk*lChunkSizeMemAligned);
-
-#endif
-
-    return iBaseAddress;
-
-}
-
-/***************************************************************************************
-Description     : Performs memory alignment for the passed size argument.
-Arguments       : x - uint representing the size to be memory aligned
-Return Values   : uint - Memory aligned size
-Assumptions     : None
-Known Issues    : None
-***************************************************************************************/
-uint OsclMemPoolAllocator::oscl_mem_aligned_size(uint x)
-{
-
-    uint y;
-
-    if (x & 0x7)
-    {
-        y = x & (~0x7);
-        y += 8;
-    }
-    else
-    {
-        y = x;
-    }
-
-    return y;
-}
-
-/***************************************************************************************
-Description     : Method for destroying memory pool
-Arguments       : None
-Return Values   : None
-Assumptions     : It is assumed that memory audit is not required so, _oscl_free used directly.
-Known Issues    : None
-Condition       : Is there any naming convention for leaving methods in oscl ?
-***************************************************************************************/
-void OsclMemPoolAllocator::DestroyMemPool()
-{
-    // If client class calls DestroyMemPool without CreateMemPool i.e iBaseAddress is NULL then leave
-    if (!iBaseAddress)
-    {
-        OSCL_LEAVE(OsclErrArgument);
-
-    }
-
-    iAlloc->deallocate(iBaseAddress);
-    iAlloc = 0;
-
-    iBaseAddress = 0;
-
-    return;
-}
-
-
-
diff --git a/oscl/oscl/osclerror/src/oscl_mempool_allocator.h b/oscl/oscl/osclerror/src/oscl_mempool_allocator.h
deleted file mode 100644 (file)
index 796ee5a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-// -*- c++ -*-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-//               O S C L _ M E M P O O L _ A L L O C A T O R
-
-// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
-/*! \addtogroup osclerror OSCL Error
- *
- * @{
- */
-
-
-/*! \file oscl_mempool_allocator.h
-    \brief This file contains the definition of memory pool allocator for leave/trap
-*/
-
-/***************************************************************************************
-File Name       : oscl_mempool_allocator.h
-Description     : File containing definition of class OsclMemPoolAllocator that provides
-                  methods for creating, deleting memory pool.
-Coding History  :
-                  Achint Kaur           April 11, 2006      Initial Draft
-***************************************************************************************/
-#ifndef OSCL_MEMPOOL_ALLOCATOR_H_INCLUDED
-#define OSCL_MEMPOOL_ALLOCATOR_H_INCLUDED
-
-#ifndef OSCL_DEFALLOC_H_INCLUDED
-// For custom allocator Oscl_DefAlloc object
-#include "oscl_defalloc.h"
-#endif
-
-#ifndef OSCL_MEM_H_INCLUDED
-#include "oscl_mem.h"
-#endif
-
-class OsclMemPoolAllocator
-{
-    public:
-        // Constructor
-        OsclMemPoolAllocator(Oscl_DefAlloc* gen_alloc = NULL);
-
-        // Virtual destructor
-        virtual ~OsclMemPoolAllocator();
-
-        // Create memory pool
-        OsclAny* CreateMemPool(const uint32 aNumChunk = 2, const uint32 aChunkSize = 4);
-
-        // Delete memory pool
-        void DestroyMemPool();
-
-        // Memory alignment
-        uint oscl_mem_aligned_size(uint size);
-
-    private:
-        Oscl_DefAlloc *iAlloc;//allocator for mempool.
-        OsclMemAllocator iDefAlloc;//default allocator
-
-        // Base address for memory pool
-        OsclAny* iBaseAddress;
-
-};
-
-#endif