All nail technicians are taught in school that they are voids in the nail plate cells that fill up with blood from the underlying tissues.
Since it is in both, finger nails and toe nails, you might want to consider this:
Splinter hemorraghes can be a sign of heart problems, but generally are a different thing all together. They are mostly caused by tiny voids in the nail plate cell production. They fill up with blood from the nail bed and appear as tiny black lines that look much like you have a splinter under your nail. Your nail plate will ride forward on the nail bed much like a train rides forward on its tracks. The rails are on the nail bed, and the grooves are on the underside of the nail plate. The voids are usually on the underside of the nail plate which allows them to fill with blood from the nail bed. They usualy are nothing to worry about unless there is a history of heart problems in your family. If so, then I would have a stress test perfromed if your doctor believes it to be