Search in sources :

Example 1 with OMRMemCategorySetPointer

use of com.ibm.j9ddr.vm29.pointer.generated.OMRMemCategorySetPointer in project openj9 by eclipse.

the class MemoryCategoryIterator method iterateAllCategories.

@SuppressWarnings("unchecked")
public static Iterator<OMRMemCategoryPointer> iterateAllCategories(J9PortLibraryPointer portLibrary) throws CorruptDataException {
    OMRMemCategorySetPointer omr_categories = portLibrary.omrPortLibrary().portGlobals().control().omr_memory_categories();
    OMRMemCategorySetPointer language_categories = portLibrary.omrPortLibrary().portGlobals().control().language_memory_categories();
    if (omr_categories.notNull() && language_categories.notNull()) {
        return IteratorHelpers.combineIterators(new MemoryCategorySetIterator(omr_categories), new MemoryCategorySetIterator(language_categories));
    } else if (omr_categories.notNull()) {
        return new MemoryCategorySetIterator(omr_categories);
    } else if (language_categories.notNull()) {
        return new MemoryCategorySetIterator(language_categories);
    } else {
        return new PortLibraryCategoryIterator(portLibrary);
    }
}
Also used : OMRMemCategorySetPointer(com.ibm.j9ddr.vm29.pointer.generated.OMRMemCategorySetPointer)

Aggregations

OMRMemCategorySetPointer (com.ibm.j9ddr.vm29.pointer.generated.OMRMemCategorySetPointer)1