1. A method for providing software transactional protection of managed pointers comprising the steps of: at compile time, using a compiler that emits calls to a software transactional memory system, the software transaction memory system is a concurrency control mechanism for controlling access to shared memory in concurrent computing; determining by the compiler that there are one or more variables being passed by reference to separately compiled code segments in at least one code segment being compiled, each variable being passed by reference using an address of the particular variable; selecting by the compiler at least one technique of a plurality of techniques for communicating the sources of the variables being passed by reference, wherein the at least one technique comprises either a fattened by-ref technique or a modified fattened by-ref technique that uses enumerations and structures, wherein the fattened by-ref technique comprises: creating a new by-ref info type that contains information necessary to distinguish different kinds of actual arguments; for a method that has at least one by-ref argument, change the by-ref argument to include an additional argument for a variable using the new by-ref info type; and at a call site for the method that has the at least one by-ref argument, inserting code to assign an appropriate one or more values to the new by-ref info type, and adding the type as a call site argument to the call to the method; and, wherein the modified fatten by-ref technique comprises: at each call site that invokes a particular method that has reference arguments needing identified, allocating a by-ref information holder; and passing the by-ref information holder by reference; modifying by the compiler the at least one code segment to implement the selected technique; and creating an executable using the modified code segment.