JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
JMMDebugErrorStream Class Reference

#include <JMMDebugErrorStream.h>

Inheritance diagram for JMMDebugErrorStream:
[legend]

Public Member Functions

 JMMDebugErrorStream ()
 
 ~JMMDebugErrorStream () override
 
- Public Member Functions inherited from JMMMonitor
 ~JMMMonitor () override
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (const JBroadcaster &source)
 
bool HasSenders () const
 
JSize GetSenderCount () const
 
bool HasRecipients () const
 
JSize GetRecipientCount () const
 
virtual JString ToString () const
 
template<class T >
void ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f)
 

Protected Member Functions

void HandleObjectDeletedAsArray (const JMMRecord &record) override
 
void HandleArrayDeletedAsObject (const JMMRecord &record) override
 
void HandleUnallocatedDeletion (const JUtf8Byte *file, const JUInt32 line, const bool isArray) override
 
void HandleMultipleDeletion (const JMMRecord &thisRecord, const JUtf8Byte *file, const JUInt32 line, const bool isArray) override
 
void HandleMultipleAllocation (const JMMRecord &thisRecord, const JMMRecord &firstRecord) override
 
- Protected Member Functions inherited from JMMMonitor
 JMMMonitor ()
 
void Receive (JBroadcaster *sender, const Message &message) override
 
- Protected Member Functions inherited from JBroadcaster
 JBroadcaster (const JBroadcaster &source)
 
void ListenTo (const JBroadcaster *sender)
 
void StopListening (const JBroadcaster *sender)
 
void ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember)
 
void StopListening (const JBroadcaster *sender, const std::type_info &messageType)
 
template<class T >
void Send (JBroadcaster *recipient, const T &message)
 
template<class T >
void Broadcast (const T &message)
 
void SendWithFeedback (JBroadcaster *recipient, Message *message)
 
void BroadcastWithFeedback (Message *message)
 
virtual void ReceiveWithFeedback (JBroadcaster *sender, Message *message)
 
virtual void ReceiveGoingAway (JBroadcaster *sender)
 

Detailed Description

JMMMonitor which listens for error messages from the memory manager and
sends them to jx_memory_debugger.

This code could be written in a much more efficient way, but since it
should ideally never be called, it doesn't matter.

Constructor & Destructor Documentation

◆ JMMDebugErrorStream()

JMMDebugErrorStream::JMMDebugErrorStream ( )

◆ ~JMMDebugErrorStream()

JMMDebugErrorStream::~JMMDebugErrorStream ( )
override

Member Function Documentation

◆ HandleArrayDeletedAsObject()

void JMMDebugErrorStream::HandleArrayDeletedAsObject ( const JMMRecord record)
overrideprotectedvirtual

Reimplemented from JMMMonitor.

◆ HandleMultipleAllocation()

void JMMDebugErrorStream::HandleMultipleAllocation ( const JMMRecord thisRecord,
const JMMRecord firstRecord 
)
overrideprotectedvirtual

Called when memory is allocated more than once at the same location (indicates bugs in malloc or JMM, not client code). thisRecord is the record of the allocation that generated the message, firstRecord is the record of the first allocation at that address.

Reimplemented from JMMMonitor.

◆ HandleMultipleDeletion()

void JMMDebugErrorStream::HandleMultipleDeletion ( const JMMRecord originalRecord,
const JUtf8Byte file,
const JUInt32  line,
const bool  isArray 
)
overrideprotectedvirtual

Called when an already-deleted memory block is deleted again. originalRecord is the JMMRecord for the block including its first deletion, file and line are the location of the multiple deletion that triggered the message. This message cannot be generated unless delete records are being kept; otherwise, the message is UnallocatedDeletion rather than MultipleDeletion.

Reimplemented from JMMMonitor.

◆ HandleObjectDeletedAsArray()

void JMMDebugErrorStream::HandleObjectDeletedAsArray ( const JMMRecord record)
overrideprotectedvirtual

Reimplemented from JMMMonitor.

◆ HandleUnallocatedDeletion()

void JMMDebugErrorStream::HandleUnallocatedDeletion ( const JUtf8Byte file,
const JUInt32  line,
const bool  isArray 
)
overrideprotectedvirtual

Called when a block is deleted which was never allocated (more precisely, which has no allocation record; this includes multiple deletions if delete records are not being kept).

Reimplemented from JMMMonitor.


The documentation for this class was generated from the following files: