There aren’t two different messages in Julia, it’s only one:
OutOfMemoryError() is a Julia error which indicates that you tried to allocate an object which Julia was able to determine would use too much memory, and it prevented you from doing it
Killed is a message from your operating system to inform you that it terminated the Julia process.
There is a 3rd option when neither Julia nor the operating system notices you overdid it on memory allocation and stops you in time: the entire machine freezes or shuts down.