Beispiel #1
0
		/*
		 * Handle a heap segment message.
		 */
		private void handleHPSG(Client client, ByteBuffer data)
		{
			var dataCopy = new byte[data.limit];
			data.rewind();
			data.get(dataCopy);
			data = ByteBuffer.wrap(dataCopy);
			client.clientData.vmHeapData.addHeapData(data);
	//xxx todo: add to the heap mentioned in <data>
		}
Beispiel #2
0
		private void handleNHSG(Client client, ByteBuffer data)
		{
			var dataCopy = new byte[data.limit];
			data.rewind();
			data.get(dataCopy);
			data = ByteBuffer.wrap(dataCopy);
			client.clientData.nativeHeapData.addHeapData(data);

			if (true)
			{
				return;
			}

			/* WORK IN PROGRESS

	//        Log.e("ddm-nativeheap", "NHSG: ----------------------------------");
	//        Log.e("ddm-nativeheap", "NHSG: " + data.limit() + " bytes");

			var copy = new byte[data.limit];
			data.get(copy);

			ByteBuffer buffer = ByteBuffer.wrap(copy);
			buffer.order = ByteOrder.BIG_ENDIAN;

			int id = buffer.getInt();
			int unitsize = buffer.get();
            long startAddress = buffer.getInt() & 0x00000000ffffffffL;
            int offset = buffer.getInt();
            int allocationUnitCount = buffer.getInt();

	//        Log.e("ddm-nativeheap", "id: " + id);
	//        Log.e("ddm-nativeheap", "unitsize: " + unitsize);
	//        Log.e("ddm-nativeheap", "startAddress: 0x" + Long.toHexString(startAddress));
	//        Log.e("ddm-nativeheap", "offset: " + offset);
	//        Log.e("ddm-nativeheap", "allocationUnitCount: " + allocationUnitCount);
	//        Log.e("ddm-nativeheap", "end: 0x" +
	//                Long.toHexString(startAddress + unitsize * allocationUnitCount));

			// read the usage
			while (buffer.position < buffer.limit)
			{
				int eState = buffer.get() & 0x000000ff;
				int eLen = (buffer.get() & 0x000000ff) + 1;
				//Log.e("ddm-nativeheap", "solidity: " + (eState & 0x7) + " - kind: "
				//        + ((eState >> 3) & 0x7) + " - len: " + eLen);
			}


	//        count += unitsize * allocationUnitCount;
	//        Log.e("ddm-nativeheap", "count = " + count);
             
            */

		}