com.sun.spot.flashmanagement
Class NorFlashSectorAllocator
java.lang.Object
com.sun.spot.flashmanagement.NorFlashSectorAllocator
- All Implemented Interfaces:
- INorFlashSectorAllocator, IPeripheral
public class NorFlashSectorAllocator
- extends Object
- implements INorFlashSectorAllocator
- See Also:
INorFlashSectorAllocator
NorFlashSectorAllocator
public NorFlashSectorAllocator()
getExtraSector
public INorFlashSector getExtraSector(int purpose)
throws InsufficientFlashMemoryException
- Specified by:
getExtraSector
in interface INorFlashSectorAllocator
- Parameters:
purpose
- code (defined in INorFlashSector
) indicating purpose of sector
- Returns:
- a free sector
- Throws:
InsufficientFlashMemoryException
- See Also:
INorFlashSectorAllocator.getExtraSector(int)
getInitialSectors
public INorFlashSector[] getInitialSectors(int purpose)
throws IOException
- Specified by:
getInitialSectors
in interface INorFlashSectorAllocator
- Parameters:
purpose
- code (defined in INorFlashSector
) indicating purpose of sectors
- Returns:
- the sectors that were in use for this purpose at the time of the last VM exit
- Throws:
InsufficientFlashMemoryException
IOException
- See Also:
INorFlashSectorAllocator.getInitialSectors(int)
releaseSector
public void releaseSector(INorFlashSector sector,
int purpose)
- Description copied from interface:
INorFlashSectorAllocator
- Notify the allocator that a previously allocated sector is no longer required
- Specified by:
releaseSector
in interface INorFlashSectorAllocator
- Parameters:
sector
- the sector to freepurpose
- code (defined in INorFlashSector
) indicating purpose of sector- See Also:
INorFlashSectorAllocator.releaseSector(com.sun.squawk.peripheral.INorFlashSector, int)
Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.